Added nvim

This commit is contained in:
Trianta
2024-01-16 18:32:22 -06:00
parent 96ff6fd09e
commit de7e5b0893
9 changed files with 275 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
-- Telescope
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>pf', builtin.find_files, {})
vim.keymap.set('n', '<C-p>', builtin.git_files, {})
vim.keymap.set('n', '<leader>ps', function()
builtin.grep_string({ search = vim.fn.input("Grep > ") })
end)
-- Harpoon
local mark = require("harpoon.mark")
local ui = require("harpoon.ui")
vim.keymap.set("n", "<leader>a", mark.add_file)
vim.keymap.set("n", "<C-t>", ui.toggle_quick_menu)
vim.keymap.set("n", "<C-q>", function() ui.nav_file(1) end)
vim.keymap.set("n", "<C-w>", function() ui.nav_file(2) end)
vim.keymap.set("n", "<C-e>", function() ui.nav_file(3) end)
vim.keymap.set("n", "<C-r>", function() ui.nav_file(4) end)
-- Zenmode
vim.keymap.set("n", "<leader>pz", function()
require("zen-mode").toggle({
window = {
width = 90,
}
})
end)
+46
View File
@@ -0,0 +1,46 @@
-- lsp-zero
local lsp = require('lsp-zero')
lsp.preset('recommended')
lsp.setup()
-- Treesitter
vim.opt.runtimepath:append("~/.local/share/nvim/parsers")
require'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all" (the five listed parsers should always be installed)
ensure_installed = { "c", "cpp", "javascript", "lua", "vim" },
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = true,
parser_install_dir = "~/.local/share/nvim/parsers",
highlight = {
enable = true,
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
}
-- Obsidian
vim.opt.conceallevel = 1
-- Colors
function ColorMyPencils(color)
color = color or "catppuccin-frappe"
vim.cmd.colorscheme(color)
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
end
ColorMyPencils()