init from ThePrimeagen
This commit is contained in:
1
after/plugin/fugitive.lua
Normal file
1
after/plugin/fugitive.lua
Normal file
@ -0,0 +1 @@
|
||||
vim.keymap.set("n", "<leader>gs", vim.cmd.Git);
|
10
after/plugin/harpoon.lua
Normal file
10
after/plugin/harpoon.lua
Normal file
@ -0,0 +1,10 @@
|
||||
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-j>", function() ui.nav_file(2) end)
|
||||
vim.keymap.set("n", "<C-k>", function() ui.nav_file(3) end)
|
||||
vim.keymap.set("n", "<C-l>", function() ui.nav_file(4) end)
|
10
after/plugin/lsp.lua
Normal file
10
after/plugin/lsp.lua
Normal file
@ -0,0 +1,10 @@
|
||||
local lsp = require('lsp-zero').preset({})
|
||||
|
||||
lsp.on_attach(function(client, bufnr)
|
||||
lsp.default_keymaps({buffer = bufnr})
|
||||
end)
|
||||
|
||||
-- (Optional) Configure lua language server for neovim
|
||||
require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls())
|
||||
|
||||
lsp.setup()
|
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>ff', builtin.find_files, {})
|
||||
vim.keymap.set('n', '<leader>pf', builtin.git_files, {})
|
||||
vim.keymap.set('n', '<leader>ps', function()
|
||||
builtin.grep_string({ search = vim.fn.input("Grep > ") });
|
||||
end)
|
22
after/plugin/treesitter.lua
Normal file
22
after/plugin/treesitter.lua
Normal file
@ -0,0 +1,22 @@
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
||||
ensure_installed = { "javascript", "typescript", "php", "c", "rust", "bash", "lua", "vim", "vimdoc", "query" },
|
||||
|
||||
-- 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)
|
Reference in New Issue
Block a user