diff options
| author | Vito G. Graffagnino <vito@graffagnino.xyz> | 2022-05-28 11:52:58 +0100 |
|---|---|---|
| committer | Vito G. Graffagnino <vito@graffagnino.xyz> | 2022-05-28 11:52:58 +0100 |
| commit | df55cb522dfd6b3d2cd2b734fce9d8fc1303385a (patch) | |
| tree | 2c51a56531a3dad6610fa961736f3dbaee3e8fe0 /lua/user/lsp | |
| parent | b9a2bc855bbd7a7d54c9e280ee875393e30cf1a6 (diff) | |
| parent | f671fc644de5edbeb4692df3b1b763754e22fb16 (diff) | |
Merge branch 'vgg' into 09-autopairs09-autopairs
Diffstat (limited to 'lua/user/lsp')
| -rw-r--r-- | lua/user/lsp/lsp-installer.lua | 5 | ||||
| -rw-r--r-- | lua/user/lsp/settings/jsonls.lua | 18 | ||||
| -rw-r--r-- | lua/user/lsp/settings/pyright.lua | 10 |
3 files changed, 17 insertions, 16 deletions
diff --git a/lua/user/lsp/lsp-installer.lua b/lua/user/lsp/lsp-installer.lua index 2fe4af2..f539050 100644 --- a/lua/user/lsp/lsp-installer.lua +++ b/lua/user/lsp/lsp-installer.lua @@ -21,6 +21,11 @@ lsp_installer.on_server_ready(function(server) opts = vim.tbl_deep_extend("force", sumneko_opts, opts) end + if server.name == "pyright" then + local pyright_opts = require("user.lsp.settings.pyright") + opts = vim.tbl_deep_extend("force", pyright_opts, opts) + end + -- This setup() function is exactly the same as lspconfig's setup function. -- Refer to https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md server:setup(opts) diff --git a/lua/user/lsp/settings/jsonls.lua b/lua/user/lsp/settings/jsonls.lua index 1fffa68..be362c9 100644 --- a/lua/user/lsp/settings/jsonls.lua +++ b/lua/user/lsp/settings/jsonls.lua @@ -1,9 +1,4 @@ -local default_schemas = nil -local status_ok, jsonls_settings = pcall(require, "nlspsettings.jsonls") -if status_ok then - default_schemas = jsonls_settings.get_default_schemas() -end - +-- Find more schemas here: https://www.schemastore.org/json/ local schemas = { { description = "TypeScript compiler configuration file", @@ -168,19 +163,10 @@ local schemas = { }, } -local function extend(tab1, tab2) - for _, value in ipairs(tab2) do - table.insert(tab1, value) - end - return tab1 -end - -local extended_schemas = extend(schemas, default_schemas) - local opts = { settings = { json = { - schemas = extended_schemas, + schemas = schemas, }, }, setup = { diff --git a/lua/user/lsp/settings/pyright.lua b/lua/user/lsp/settings/pyright.lua new file mode 100644 index 0000000..6354274 --- /dev/null +++ b/lua/user/lsp/settings/pyright.lua @@ -0,0 +1,10 @@ +return { + settings = { + + python = { + analysis = { + typeCheckingMode = "off" + } + } + }, +} |
