]> git.huck.website - nvim.git/commitdiff
edited: qol updates
authorHuck Boles <huck@huck.website>
Sun, 7 Jan 2024 17:51:37 +0000 (09:51 -0800)
committerHuck Boles <huck@huck.website>
Sun, 7 Jan 2024 17:51:37 +0000 (09:51 -0800)
init.lua
lua/plugins/lsp.lua
lua/plugins/telescope.lua

index ac11d89b8d3d60f0f35e6d4a736b8b37cbdf5acf..2e7cd48154cbb2bd737b64d709a26a872d8938f9 100644 (file)
--- 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 = {
index 1282fe317ca5b3ce24dd2b6faf4b0e649b2e6acf..af3c66badbe322886270c65b2c32456189ab4fde 100644 (file)
@@ -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 = {
index b8f29a5e6ad226c74c06d0f5820b5336070ba914..1764063682bd7095345190110e4704c9e7ad3c5d 100644 (file)
@@ -35,6 +35,14 @@ return {
             { '<LEADER>li',  '<CMD>Telescope lsp_implementations<CR>' },
             { '<LEADER>ls',  '<CMD>Telescope lsp_document_symbols<CR>' },
             { '<LEADER>lS',  '<CMD>Telescope lsp_workspace_symbols<CR>' },
+            { '<LEADER>tw', function()
+                local word = vim.fn.expand("<cword>")
+                require('telescope.builtin').grep_string({ search = word })
+            end },
+            { '<LEADER>tW', function()
+                local word = vim.fn.expand("<cWORD>")
+                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', '<LEADER>F',
                 function()
@@ -120,7 +127,6 @@ return {
                 end
             )
 
-
             -- give telescope window if opened with no command
             vim.api.nvim_create_autocmd('VimEnter', {
                 pattern = '*',