Merge 'upstream/master' fixup style, lua lsp snippets

fixup: updated some style stuff
feat: enable lua lsp snipppets
This commit is contained in:
Damjan 9000 2024-03-01 11:09:32 +01:00
commit b650582c60
3 changed files with 17 additions and 15 deletions

View File

@ -163,6 +163,9 @@ return {
-- If lua_ls is really slow on your computer, you can try this instead: -- If lua_ls is really slow on your computer, you can try this instead:
-- library = { vim.env.VIMRUNTIME }, -- library = { vim.env.VIMRUNTIME },
}, },
completion = {
callSnippet = 'Replace',
},
-- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings -- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
-- diagnostics = { disable = { 'missing-fields' } }, -- diagnostics = { disable = { 'missing-fields' } },
}, },
@ -190,15 +193,11 @@ return {
handlers = { handlers = {
function(server_name) function(server_name)
local server = servers[server_name] or {} local server = servers[server_name] or {}
require('lspconfig')[server_name].setup { -- This handles overriding only values explicitly passed
cmd = server.cmd, -- by the server configuration above. Useful when disabling
settings = server.settings, -- certain features of an LSP (for example, turning off formatting for tsserver)
filetypes = server.filetypes, server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
-- This handles overriding only values explicitly passed require('lspconfig')[server_name].setup(server)
-- 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 {}),
}
end, end,
}, },
} }

View File

@ -20,9 +20,15 @@ return {
-- Simple and easy statusline. -- Simple and easy statusline.
-- You could remove this setup call if you don't like it, -- You could remove this setup call if you don't like it,
-- and try some other statusline plugin -- and try some other statusline plugin
require('mini.statusline').setup() local statusline = require 'mini.statusline'
MiniStatusline.section_location = function() statusline.setup()
return '%2l:%-2v'
-- 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 end
-- ... and there is more! -- ... and there is more!

View File

@ -10,9 +10,6 @@
-- --
-- NOTE: Here is where you install your plugins. -- NOTE: Here is where you install your plugins.
require('lazy').setup { require('lazy').setup {
-- [[ Plugin Specs list ]]
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically