Update scripts
This commit is contained in:
+13
-13
@@ -24,7 +24,6 @@ call plug#begin(stdpath('config') . '/plugged')
|
||||
|
||||
" Harpoon //////////////////////////////////////////////////////////////////////////////////////
|
||||
Plug 'nvim-lua/plenary.nvim'
|
||||
Plug 'ThePrimeagen/harpoon', {'branch': 'harpoon2'}
|
||||
|
||||
" lsp-zero begin
|
||||
" LSP Support
|
||||
@@ -157,18 +156,6 @@ lua <<EOF
|
||||
-- enable_suggestions_on_files = "*", -- pattern matching syntax to enable suggestions on specific files, either a string or a list of strings
|
||||
-- })
|
||||
|
||||
-- Harpoon ///////////////////////////////////////////////////////////////////////////////////////
|
||||
local harpoon = require('harpoon')
|
||||
harpoon:setup()
|
||||
vim.keymap.set("n", "<M-0>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||
vim.keymap.set("n", "<M-a>", function() harpoon:list():prepend() end)
|
||||
vim.keymap.set("n", "<M-1>", function() harpoon:list():select(1) end)
|
||||
vim.keymap.set("n", "<M-2>", function() harpoon:list():select(2) end)
|
||||
vim.keymap.set("n", "<M-3>", function() harpoon:list():select(3) end)
|
||||
vim.keymap.set("n", "<M-4>", function() harpoon:list():select(4) end)
|
||||
vim.keymap.set("n", "<M-h>", function() harpoon:list():prev() end)
|
||||
vim.keymap.set("n", "<M-l>", function() harpoon:list():next() end)
|
||||
|
||||
-- Treesitter ////////////////////////////////////////////////////////////////////////////////////
|
||||
-- TODO: 2022-06-19 Treesitter is too slow on large C++ files
|
||||
-- require('nvim-treesitter.configs').setup {
|
||||
@@ -193,6 +180,19 @@ lua <<EOF
|
||||
-- },
|
||||
-- }
|
||||
|
||||
|
||||
-- Per-Project Bindings /////////////////////////////////////////////////////////////////////////////
|
||||
-- Automatically load project file on buffer enter
|
||||
vim.api.nvim_create_autocmd({"BufEnter"}, {
|
||||
pattern = {"*.c", "*.h"},
|
||||
callback = function(ev)
|
||||
local project_file = vim.fn.expand('%:p:h') .. '/project_nvim.lua'
|
||||
if vim.fn.filereadable(project_file) == 1 then
|
||||
vim.cmd('luafile ' .. vim.fn.fnameescape(project_file))
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
-- Vim Options ///////////////////////////////////////////////////////////////////////////////////
|
||||
vim.opt.autowrite=true -- Automatically save before cmds like :next and :prev
|
||||
vim.opt.colorcolumn={80, 100} -- Set a 80 and 100 char column ruler
|
||||
|
||||
Reference in New Issue
Block a user