Compare commits

..

No commits in common. "53d9b50e0bbc7b8512ad898604d64926ca16a538" and "00f87db6923c696b7d561a5f817aed0dcf3dc48c" have entirely different histories.

View File

@ -82,52 +82,46 @@ return {
},
config = function()
local capabilities = vim.tbl_deep_extend(
'force', vim.lsp.protocol.make_client_capabilities(),
require('cmp_nvim_lsp').default_capabilities())
local server_opts = {
clangd = {
cmd = { 'clangd', '--completion-style=detailed' },
},
lua_ls = {
settings = {
Lua = {
diagnostics = {
disable = { 'missing-fields', },
globals = { 'vim', },
},
},
},
},
pyright = {
settings = {
pyright = {
disableOrganizeImports = true,
},
},
},
harper_ls = {
filetypes = {}, -- Disable for all filetypes
},
}
for server, opts in pairs(server_opts) do
local lspconfig_default_opts = {
-- Broadcast full client capabilities to language servers
opts.capabilities = vim.tbl_deep_extend(
'force', {}, capabilities, opts.capabilities or {})
vim.lsp.config(server, opts)
end
capabilities = vim.tbl_deep_extend(
'force', vim.lsp.protocol.make_client_capabilities(),
require('cmp_nvim_lsp').default_capabilities()),
}
require('mason').setup()
require('mason-lspconfig').setup({
automatic_enable = true,
automatic_installation = false,
ensure_installed = ensure_installed,
})
vim.lsp.config('clangd', {
cmd = { 'clangd', '--completion-style=detailed' },
})
vim.lsp.config('lua_ls', {
settings = {
Lua = {
diagnostics = {
disable = { 'missing-fields', },
globals = { 'vim', },
},
},
},
})
vim.lsp.config('pyright', {
settings = {
pyright = {
disableOrganizeImports = true,
},
},
})
vim.lsp.config('harper_ls', {
filetypes = {}, -- Disable for all filetypes
})
-- (Dis|en)able harper-ls when spell mode is (dis|en)enabled.
vim.api.nvim_create_autocmd("OptionSet", {
pattern = "spell",
@ -179,7 +173,7 @@ return {
},
formatting = {
format = function(_, vim_item)
format = function(entry, vim_item)
-- Set a limit to how wide the completion menu can be
local winwidth = vim.fn.winwidth(vim.api.nvim_get_current_win())
local menuwidth = math.min(winwidth / 2, 70)
@ -197,7 +191,7 @@ return {
documentation = cmp.config.window.bordered(),
},
preselect = 'None', -- Don't preselect completions suggested by source
preselect = 'none', -- Don't preselect completions suggested by source
})
require("cmp_git").setup({})