Compare commits

...

1 Commits

Author SHA1 Message Date
christianchiarulli 0981b28382 lsp updates
2 years ago

@ -4,3 +4,4 @@ require "user.plugins"
require "user.colorscheme"
require "user.cmp"
require "user.lsp"

@ -102,6 +102,7 @@ cmp.setup {
-- vim_item.kind = string.format('%s %s', kind_icons[vim_item.kind], vim_item.kind) -- This concatonates the icons with the name of the item kind
vim_item.menu = ({
nvim_lsp = "[LSP]",
nvim_lua = "[NVIM_LUA]",
luasnip = "[Snippet]",
buffer = "[Buffer]",
path = "[Path]",
@ -111,6 +112,7 @@ cmp.setup {
},
sources = {
{ name = "nvim_lsp" },
{ name = "nvim_lua" },
{ name = "luasnip" },
{ name = "buffer" },
{ name = "path" },

@ -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)

@ -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 = {

@ -0,0 +1,10 @@
return {
settings = {
python = {
analysis = {
typeCheckingMode = "off"
}
}
},
}

@ -56,6 +56,7 @@ return packer.startup(function(use)
use "hrsh7th/cmp-cmdline" -- cmdline completions
use "saadparwaiz1/cmp_luasnip" -- snippet completions
use "hrsh7th/cmp-nvim-lsp"
use "hrsh7th/cmp-nvim-lua"
-- snippets
use "L3MON4D3/LuaSnip" --snippet engine
@ -64,7 +65,6 @@ return packer.startup(function(use)
-- LSP
use "neovim/nvim-lspconfig" -- enable LSP
use "williamboman/nvim-lsp-installer" -- simple to use language server installer
use "tamago324/nlsp-settings.nvim" -- language server settings defined in json for
-- Automatically set up your configuration after cloning packer.nvim
-- Put this at the end after all plugins

Loading…
Cancel
Save