Initial commit; lsp treesitter telescope undotree formatter colors
This commit is contained in:
10
after/plugin/colors.lua
Normal file
10
after/plugin/colors.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
function ColorMyPencils(color)
|
||||
color = color or "monokai"
|
||||
vim.cmd.colorscheme(color)
|
||||
|
||||
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
||||
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
||||
|
||||
end
|
||||
|
||||
ColorMyPencils()
|
||||
9
after/plugin/harpoon.lua
Normal file
9
after/plugin/harpoon.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
local mark = require("harpoon.mark")
|
||||
local ui = require("harpoon.ui")
|
||||
|
||||
vim.keymap.set("n", "<leader>a", mark.add_file)
|
||||
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
|
||||
vim.keymap.set("n", "<C-h>", function() ui.nav_file(1) end)
|
||||
vim.keymap.set("n", "<C-t>", function() ui.nav_file(2) end)
|
||||
vim.keymap.set("n", "<C-n>", function() ui.nav_file(3) end)
|
||||
vim.keymap.set("n", "<C-s>", function() ui.nav_file(4) end)
|
||||
16
after/plugin/lsp.lua
Normal file
16
after/plugin/lsp.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
local lsp = require('lsp-zero').preset({})
|
||||
|
||||
lsp.ensure_installed({
|
||||
'lua_ls', -- Lua
|
||||
'rust_analyzer', -- rust
|
||||
'texlab', -- LaTeX
|
||||
'clangd', -- C/C++
|
||||
'jedi_language_server', -- Python
|
||||
})
|
||||
|
||||
lsp.on_attach(function(client, bufnr)
|
||||
lsp.default_keymaps({buffer = bufnr})
|
||||
end)
|
||||
|
||||
|
||||
lsp.setup()
|
||||
1
after/plugin/neoformat.lua
Normal file
1
after/plugin/neoformat.lua
Normal file
@@ -0,0 +1 @@
|
||||
vim.keymap.set('n', '<leader>f', vim.cmd.Neoformat)
|
||||
6
after/plugin/telescope.lua
Normal file
6
after/plugin/telescope.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
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)
|
||||
21
after/plugin/treesitter.lua
Normal file
21
after/plugin/treesitter.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
||||
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "rust", "cpp", "cmake", "latex", "python" },
|
||||
|
||||
-- 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,
|
||||
|
||||
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,
|
||||
},
|
||||
}
|
||||
1
after/plugin/undotree.lua
Normal file
1
after/plugin/undotree.lua
Normal file
@@ -0,0 +1 @@
|
||||
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
|
||||
1
after/plugin/vim-fugitive.lua
Normal file
1
after/plugin/vim-fugitive.lua
Normal file
@@ -0,0 +1 @@
|
||||
vim.keymap.set("n", "<leader>gs", vim.cmd.Git)
|
||||
Reference in New Issue
Block a user