all repos

init.lua @ c669df8

my nvim config
2 files changed, 5 insertions(+), 30 deletions(-)
setup lua lsp
Author: flof-ik ss2316544@gmail.com
Committed at: 2022-03-15 12:18:58 +0200
Parent: 6c263d5
M lua/fk/lsp/init.lua

@@ -15,13 +15,10 @@ on_attach = on_attach,

capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities()), flags = { debounce_text_changes = 150 }, } + local ok, server_opts = pcall(require, "fk.lsp.providers." .. server.name) if ok then opts = vim.tbl_deep_extend("force", opts, server_opts or {}) - end - - if server.name == "sumneko_lua" then - opts = vim.tbl_deep_extend("force", opts, require("lua-dev").setup {}) end if server.name == "rust_analyzer" then

@@ -29,6 +26,10 @@ opts = vim.tbl_deep_extend("force", server:get_default_options(), opts)

require "fk.plugin.rust-tools"(opts) server:attach_buffers() return + end + + if server.name == "sumneko_lua" then + opts = vim.tbl_extend("force", opts or {}, require("lua-dev").setup { lspconfig = server:get_default_options() }) end server:setup(opts)
D

@@ -1,26 +0,0 @@

-return { - settings = { - Lua = { - diagnostics = { - globals = { - "vim", - "describe", - "it", - "before_each", - "after_each", - "teardown", - "pending", - "clear", - }, - }, - workspace = { - library = { - [vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true, - [vim.fn.expand "$VIMRUNTIME/lua"] = true, - }, - maxPreload = 100000, - preloadFileSize = 10000, - }, - }, - }, -}