From e51ac2890e5196bdb7956a2665437b659eed8812 Mon Sep 17 00:00:00 2001 From: jakobst1n Date: Thu, 19 Sep 2024 10:01:54 +0200 Subject: Do a bunch of random things --- Common/nvim/lua/basic.lua | 1 + Common/nvim/lua/helper_functions.lua | 10 ++++++++++ Common/nvim/lua/lsp-conf.lua | 1 + Common/nvim/lua/plugins.lua | 16 ---------------- 4 files changed, 12 insertions(+), 16 deletions(-) (limited to 'Common/nvim/lua') diff --git a/Common/nvim/lua/basic.lua b/Common/nvim/lua/basic.lua index 7bee1ba..47a7ab6 100755 --- a/Common/nvim/lua/basic.lua +++ b/Common/nvim/lua/basic.lua @@ -6,6 +6,7 @@ vim.opt.smartcase = true vim.opt.showmatch = true vim.opt.swapfile = false vim.opt.smartindent = true +vim.opt.mouse = "" -- Default to the "modern normal" vim.opt.expandtab = true diff --git a/Common/nvim/lua/helper_functions.lua b/Common/nvim/lua/helper_functions.lua index 9d5a80e..15db30a 100755 --- a/Common/nvim/lua/helper_functions.lua +++ b/Common/nvim/lua/helper_functions.lua @@ -251,3 +251,13 @@ vim.api.nvim_create_user_command("InsertDateTime", insert_date_time, {}) -- Reminders for system clipboard register vim.api.nvim_set_keymap('v', 'y', [[:lua vim.api.nvim_echo({{"Use register '+' for system clipboard", "ErrorMsg"}}, false, {})]], {noremap = true, silent=false}) vim.api.nvim_set_keymap('n', 'y', [[:lua vim.api.nvim_echo({{"Use register '+' for system clipboard", "ErrorMsg"}}, false, {})]], {noremap = true, silent=false}) + + +vim.cmd [[ +augroup highlight_current_word + autocmd! + autocmd CursorHold * lua vim.lsp.buf.document_highlight() + autocmd CursorHoldI * lua vim.lsp.buf.document_highlight() + autocmd CursorMoved * lua vim.lsp.buf.clear_references() +augroup END +]] diff --git a/Common/nvim/lua/lsp-conf.lua b/Common/nvim/lua/lsp-conf.lua index 2c7463b..9025244 100644 --- a/Common/nvim/lua/lsp-conf.lua +++ b/Common/nvim/lua/lsp-conf.lua @@ -74,6 +74,7 @@ vim.api.nvim_create_autocmd('LspAttach', { vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts) vim.keymap.set('n', '', vim.lsp.buf.signature_help, opts) + vim.keymap.set('i', '', vim.lsp.buf.signature_help, opts) vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, opts) vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, opts) vim.keymap.set('n', 'wl', function() diff --git a/Common/nvim/lua/plugins.lua b/Common/nvim/lua/plugins.lua index 829ca15..2ad775f 100755 --- a/Common/nvim/lua/plugins.lua +++ b/Common/nvim/lua/plugins.lua @@ -57,22 +57,6 @@ return require('packer').startup(function(use) 'neovim/nvim-lspconfig' , } - -- Treesitter, quicker highlighting and such - use { - "nvim-treesitter/nvim-treesitter", - config = function() - require'nvim-treesitter.configs'.setup { - ensure_installed = { "c", "cpp", "python", "php", "java", "lua", "vim", "vimdoc", "query", "php", "sql" }, - sync_install = false, - auto_install = true, - highlight = { - enable = false, - }, - --ignore_install = { "javascript" }, - } - end - } - -- vim-dadbob (run sql directly) use { 'tpope/vim-dadbod', -- cgit v1.2.3