From: Huck Boles Date: Sun, 7 Jan 2024 17:51:37 +0000 (-0800) Subject: edited: qol updates X-Git-Url: https://git.huck.website/?a=commitdiff_plain;h=99b3d2a4c1d148694f571c33e25c24d8fce2ad2f;p=nvim.git edited: qol updates --- diff --git a/init.lua b/init.lua index ac11d89..2e7cd48 100644 --- a/init.lua +++ b/init.lua @@ -17,8 +17,8 @@ vim.opt.runtimepath:prepend(lazypath) require("lazy").setup("plugins", { defaults = { lazy = true }, - checker = { enabled = true }, - change_detection = { notify = false, }, + checker = { enabled = true, notify = false }, + change_detection = { enabled = true, notify = false, }, performance = { rtp = { disabled_plugins = { diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 1282fe3..af3c66b 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -72,11 +72,18 @@ return { lsp.clangd.setup({ on_attach = keybinds }) lsp.cssls.setup({ on_attach = keybinds }) lsp.html.setup({ on_attach = keybinds }) - lsp.lua_ls.setup({ on_attach = keybinds }) lsp.solargraph.setup({ on_attach = keybinds }) lsp.julials.setup({ on_attach = keybinds }) lsp.texlab.setup({ on_attach = keybinds }) lsp.gopls.setup({ on_attach = keybinds }) + lsp.lua_ls.setup({ + on_attach = keybinds, + settings = { + Lua = { + diagnostics = { globals = "vim" } + } + } + }) -- diagnostic settings vim.lsp.diagnostics = { diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index b8f29a5..1764063 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -35,6 +35,14 @@ return { { 'li', 'Telescope lsp_implementations' }, { 'ls', 'Telescope lsp_document_symbols' }, { 'lS', 'Telescope lsp_workspace_symbols' }, + { 'tw', function() + local word = vim.fn.expand("") + require('telescope.builtin').grep_string({ search = word }) + end }, + { 'tW', function() + local word = vim.fn.expand("") + require('telescope.builtin').grep_string({ search = word }) + end }, }, config = function() local actions = require('telescope.actions') @@ -72,7 +80,6 @@ return { require('telescope').load_extension('fzf') - -- live grep in git repo, or fall back to current directory vim.keymap.set('n', 'F', function() @@ -120,7 +127,6 @@ return { end ) - -- give telescope window if opened with no command vim.api.nvim_create_autocmd('VimEnter', { pattern = '*',