fix ts_ls thing, update lualine path
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
'neovim/nvim-lspconfig',
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
"hrsh7th/nvim-cmp",
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"SergioRibera/cmp-dotenv",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"L3MON4D3/LuaSnip",
|
||||
"j-hui/fidget.nvim",
|
||||
"rafamadriz/friendly-snippets",
|
||||
'williamboman/mason.nvim',
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
'hrsh7th/nvim-cmp',
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-buffer',
|
||||
'hrsh7th/cmp-path',
|
||||
'SergioRibera/cmp-dotenv',
|
||||
'hrsh7th/cmp-cmdline',
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
'L3MON4D3/LuaSnip',
|
||||
'j-hui/fidget.nvim',
|
||||
'rafamadriz/friendly-snippets',
|
||||
{ 'towolf/vim-helm', ft = 'helm' },
|
||||
},
|
||||
|
||||
@@ -30,10 +30,26 @@ return {
|
||||
require('mason-lspconfig').setup({
|
||||
-- Replace the language servers listed here
|
||||
-- with the ones you want to install
|
||||
ensure_installed = { 'tsserver', 'lua_ls', 'gopls', 'pylsp', 'gitlab_ci_ls', 'yamlls', 'ansiblels', 'terraformls', 'helm_ls' },
|
||||
ensure_installed = {
|
||||
'tsserver',
|
||||
'lua_ls',
|
||||
'gopls',
|
||||
'pylsp',
|
||||
'gitlab_ci_ls',
|
||||
'yamlls',
|
||||
'ansiblels',
|
||||
'terraformls',
|
||||
'helm_ls'
|
||||
},
|
||||
handlers = {
|
||||
function(server_name)
|
||||
require('lspconfig')[server_name].setup({})
|
||||
if server_name == 'tsserver' then
|
||||
server_name = 'ts_ls'
|
||||
end
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
require('lspconfig')[server_name].setup({
|
||||
capabilities = capabilities
|
||||
})
|
||||
end,
|
||||
}
|
||||
})
|
||||
@@ -41,13 +57,12 @@ return {
|
||||
sources = {
|
||||
{ name = 'path' },
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'dotenv' },
|
||||
{ name = 'luasnip', keyword_length = 2 },
|
||||
{ name = 'buffer', keyword_length = 3 },
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
-- `Enter` key to confirm completion
|
||||
["<CR>"] = cmp.mapping({
|
||||
['<CR>'] = cmp.mapping({
|
||||
i = function(fallback)
|
||||
if cmp.visible() and cmp.get_active_entry() then
|
||||
cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false })
|
||||
@@ -58,7 +73,7 @@ return {
|
||||
s = cmp.mapping.confirm({ select = true }),
|
||||
c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }),
|
||||
}),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.locally_jumpable(1) then
|
||||
@@ -66,9 +81,9 @@ return {
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
end, { 'i', 's' }),
|
||||
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.locally_jumpable(-1) then
|
||||
@@ -76,7 +91,7 @@ return {
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
end, { 'i', 's' }),
|
||||
|
||||
-- Ctrl+Space to trigger completion menu
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
@@ -126,11 +141,11 @@ return {
|
||||
library = {
|
||||
vim.env.VIMRUNTIME
|
||||
-- Depending on the usage, you might want to add additional paths here.
|
||||
-- "${3rd}/luv/library"
|
||||
-- "${3rd}/busted/library",
|
||||
-- '${3rd}/luv/library'
|
||||
-- '${3rd}/busted/library',
|
||||
}
|
||||
-- or pull in all of 'runtimepath'. NOTE: this is a lot slower
|
||||
-- library = vim.api.nvim_get_runtime_file("", true)
|
||||
-- library = vim.api.nvim_get_runtime_file('', true)
|
||||
}
|
||||
})
|
||||
end,
|
||||
@@ -142,7 +157,7 @@ return {
|
||||
settings = {
|
||||
['helm-ls'] = {
|
||||
yamlls = {
|
||||
path = "yaml-language-server",
|
||||
path = 'yaml-language-server',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,10 @@ return {
|
||||
},
|
||||
sections = {
|
||||
lualine_c = {
|
||||
'filename',
|
||||
{
|
||||
'filename',
|
||||
path = 4,
|
||||
},
|
||||
function()
|
||||
return require("nvim-treesitter").statusline({
|
||||
indicator_size = 70,
|
||||
@@ -64,3 +67,4 @@ return {
|
||||
})
|
||||
end
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user