From 1e7719417f0930a97e0318d1fd51232fb96cd6f8 Mon Sep 17 00:00:00 2001 From: EvilMuffinHa Date: Thu, 11 May 2023 21:09:38 -0400 Subject: [PATCH] sumneko to lua_ls{ --- nvim/lua/lsp.lua | 15 +++++++-------- nvim/lua/tel.lua | 10 ++++------ 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/nvim/lua/lsp.lua b/nvim/lua/lsp.lua index 4114e32..f939c4c 100644 --- a/nvim/lua/lsp.lua +++ b/nvim/lua/lsp.lua @@ -26,9 +26,9 @@ vim.g.coq_settings = { local coq = require('coq') require('coq_3p') { - { src = 'vimtex', short_name = 'TEX' }, + { src = 'vimtex', short_name = 'TEX' }, { src = 'nvimlua', short_name = 'NLUA', conf_only = true }, - { src = 'bc', short_name = 'CALC', precision = 8 }, + { src = 'bc', short_name = 'CALC', precision = 8 }, } @@ -54,7 +54,7 @@ local function find_repo_root(names) end local lsp_confs = { - sumneko_lua = { + lua_ls = { settings = { Lua = { -- Settings for working with nvim (copied from https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#sumneko_lua) @@ -127,7 +127,6 @@ local lsp_confs = { }, svelte = {}, svls = {}, - } local lsp_special_setup = { @@ -189,9 +188,9 @@ vim.diagnostic.config({ do -- signs local signs = { { 'DiagnosticSignError', text = '×', texthl = 'DiagnosticSignError' }, - { 'DiagnosticSignWarn', text = '>', texthl = 'DiagnosticSignWarn' }, - { 'DiagnosticSignInfo', text = 'I', texthl = 'DiagnosticSignInfo' }, - { 'DiagnosticSignHint', text = 'H', texthl = 'DiagnosticSignHint' }, + { 'DiagnosticSignWarn', text = '>', texthl = 'DiagnosticSignWarn' }, + { 'DiagnosticSignInfo', text = 'I', texthl = 'DiagnosticSignInfo' }, + { 'DiagnosticSignHint', text = 'H', texthl = 'DiagnosticSignHint' }, } for _, sign in pairs(signs) do local name = sign[1] @@ -232,7 +231,7 @@ M.format_on_save_hook = function() end vim.cmd [[ - augroup hoverlspconfig + augroup hoverlspconfig au! " diagnostic on hover au BufWritePre * lua require'lsp'.format_on_save_hook() diff --git a/nvim/lua/tel.lua b/nvim/lua/tel.lua index 6e41b7a..3ac8221 100644 --- a/nvim/lua/tel.lua +++ b/nvim/lua/tel.lua @@ -7,14 +7,11 @@ telescope.setup({ i = { [''] = { '', type = 'command' }, [''] = 'close', - [''] = 'select_horizontal', }, n = { q = 'close', - [''] = { '', type = 'command' }, - [''] = 'select_horizontal', }, }, @@ -110,9 +107,9 @@ telescope.register_extension { make_display = function(displayer) return function(e) return displayer { - { e.value.idx .. ":", "TelescopePromptPrefix" }, + { e.value.idx .. ":", "TelescopePromptPrefix" }, { e.value.add.command_title }, - { e.value.add.client_name, "TelescopeResultsComment" }, + { e.value.add.client_name, "TelescopeResultsComment" }, } end end, @@ -142,7 +139,8 @@ telescope.register_extension { end return indexed_items end)(items) - local displayer = vim.F.if_nil(sopts.make_displayer, function() end)(widths) + local displayer = vim.F.if_nil(sopts.make_displayer, function() + end)(widths) local make_display = vim.F.if_nil(sopts.make_display, function(_) return function(e) local x, _ = opts.format_item(e.value.text)