From b58666dd15fa9abd40c53b4e6b7a1e1c6e586dcb Mon Sep 17 00:00:00 2001 From: TJ DeVries Date: Thu, 29 Feb 2024 12:08:01 -0500 Subject: [PATCH 1/2] fixup: updated some style stuff --- init.lua | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/init.lua b/init.lua index 89da77b..c81ae2e 100644 --- a/init.lua +++ b/init.lua @@ -219,9 +219,6 @@ vim.opt.rtp:prepend(lazypath) -- -- NOTE: Here is where you install your plugins. require('lazy').setup { - - -- [[ Plugin Specs list ]] - -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically @@ -592,15 +589,11 @@ require('lazy').setup { handlers = { function(server_name) local server = servers[server_name] or {} - require('lspconfig')[server_name].setup { - cmd = server.cmd, - settings = server.settings, - filetypes = server.filetypes, - -- This handles overriding only values explicitly passed - -- by the server configuration above. Useful when disabling - -- certain features of an LSP (for example, turning off formatting for tsserver) - capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {}), - } + -- This handles overriding only values explicitly passed + -- by the server configuration above. Useful when disabling + -- certain features of an LSP (for example, turning off formatting for tsserver) + server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {}) + require('lspconfig')[server_name].setup(server) end, }, } @@ -761,9 +754,15 @@ require('lazy').setup { -- Simple and easy statusline. -- You could remove this setup call if you don't like it, -- and try some other statusline plugin - require('mini.statusline').setup() - MiniStatusline.section_location = function() - return '%2l:%-2v' + local statusline = require 'mini.statusline' + statusline.setup() + + -- You can confiure sections in the statusline by overriding their + -- default behavior. For example, here we disable the section for + -- cursor information because line numbers are already enabled + ---@diagnostic disable-next-line: duplicate-set-field + statusline.section_location = function() + return '' end -- ... and there is more! From 38828dcaf7c140902fedeaa75b017bf968400bb0 Mon Sep 17 00:00:00 2001 From: Anton Kastritskii Date: Thu, 29 Feb 2024 18:14:36 +0000 Subject: [PATCH 2/2] feat: enable lua lsp snipppets (#660) --- init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.lua b/init.lua index c81ae2e..9146b5f 100644 --- a/init.lua +++ b/init.lua @@ -562,6 +562,9 @@ require('lazy').setup { -- If lua_ls is really slow on your computer, you can try this instead: -- library = { vim.env.VIMRUNTIME }, }, + completion = { + callSnippet = 'Replace', + }, -- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings -- diagnostics = { disable = { 'missing-fields' } }, },