From 740cca7f0a7bcd0a95059a02994605dc97c9d170 Mon Sep 17 00:00:00 2001 From: MasterGordon Date: Mon, 26 Jul 2021 23:00:47 +0200 Subject: [PATCH] fixed lsp --- lua/plugins.lua | 6 ++++++ lua/plugins/formatter.lua | 2 +- lua/plugins/lsp.lua | 10 ++++++++++ plugin/packer_compiled.lua | 41 +++++++++++++++++++++++--------------- setup.sh | 14 +++++++++++-- 5 files changed, 54 insertions(+), 19 deletions(-) mode change 100644 => 100755 setup.sh diff --git a/lua/plugins.lua b/lua/plugins.lua index 6e6066e..9af071c 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -138,5 +138,11 @@ return require("packer").startup( end, requires = "kyazdani42/nvim-web-devicons" } + use { + "lewis6991/spellsitter.nvim", + config = function() + require("spellsitter").setup() + end + } end ) diff --git a/lua/plugins/formatter.lua b/lua/plugins/formatter.lua index 29d1d66..a1f027f 100644 --- a/lua/plugins/formatter.lua +++ b/lua/plugins/formatter.lua @@ -1,6 +1,6 @@ local prettierd = function() return { - exe = "prettierd", + exe = "prettier_d_slim", args = {vim.api.nvim_buf_get_name(0)}, stdin = true } diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 90bf09f..11bbb65 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -97,3 +97,13 @@ local on_attach = function(client, bufnr) buf_set_keymap("n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) buf_set_keymap("n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) end + +local servers = {"pyright", "jsonls", "tsserver", "bashls", "clangd", "cssls"} +for _, lsp in ipairs(servers) do + nvim_lsp[lsp].setup { + on_attach = on_attach, + flags = { + debounce_text_changes = 150 + } + } +end diff --git a/plugin/packer_compiled.lua b/plugin/packer_compiled.lua index db16544..2549cf9 100644 --- a/plugin/packer_compiled.lua +++ b/plugin/packer_compiled.lua @@ -168,6 +168,11 @@ _G.packer_plugins = { loaded = true, path = "/home/gordon/.local/share/nvim/site/pack/packer/start/popup.nvim" }, + ["spellsitter.nvim"] = { + config = { "\27LJ\1\0029\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\16spellsitter\frequire\0" }, + loaded = true, + path = "/home/gordon/.local/share/nvim/site/pack/packer/start/spellsitter.nvim" + }, ["telescope.nvim"] = { loaded = true, path = "/home/gordon/.local/share/nvim/site/pack/packer/start/telescope.nvim" @@ -188,26 +193,30 @@ time([[Config for formatter.nvim]], false) time([[Config for nvim-treesitter]], true) try_loadstring("\27LJ\1\2œ\2\0\0\3\0\14\0\0214\0\0\0%\1\1\0>\0\2\0027\0\2\0003\1\3\0>\0\2\0014\0\0\0%\1\4\0>\0\2\0027\0\2\0003\1\6\0003\2\5\0:\2\a\0013\2\b\0:\2\t\0013\2\n\0:\2\v\0013\2\f\0:\2\r\1>\0\2\1G\0\1\0\fautotag\1\0\1\venable\2\vindent\1\0\1\venable\2\14highlight\1\0\1\venable\2\26context_commentstring\1\0\0\1\0\2\19enable_autocmd\2\venable\2\28nvim-treesitter.configs\1\0\1\30enable_check_bracket_line\2\nsetup\19nvim-autopairs\frequire\0", "config", "nvim-treesitter") time([[Config for nvim-treesitter]], false) --- Config for: nvim-tree.lua -time([[Config for nvim-tree.lua]], true) -try_loadstring("\27LJ\1\0021\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\22plugins/nvim-tree\frequire\0", "config", "nvim-tree.lua") -time([[Config for nvim-tree.lua]], false) +-- Config for: nvim-colorizer.lua +time([[Config for nvim-colorizer.lua]], true) +try_loadstring("\27LJ\1\0027\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\14colorizer\frequire\0", "config", "nvim-colorizer.lua") +time([[Config for nvim-colorizer.lua]], false) -- Config for: diffview.nvim time([[Config for diffview.nvim]], true) try_loadstring("\27LJ\1\0020\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\21plugins/diffview\frequire\0", "config", "diffview.nvim") time([[Config for diffview.nvim]], false) +-- Config for: spellsitter.nvim +time([[Config for spellsitter.nvim]], true) +try_loadstring("\27LJ\1\0029\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\16spellsitter\frequire\0", "config", "spellsitter.nvim") +time([[Config for spellsitter.nvim]], false) -- Config for: numb.nvim time([[Config for numb.nvim]], true) try_loadstring("\27LJ\1\0022\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\tnumb\frequire\0", "config", "numb.nvim") time([[Config for numb.nvim]], false) --- Config for: nvim-compe -time([[Config for nvim-compe]], true) -try_loadstring("\27LJ\1\2-\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\18plugins/compe\frequire\0", "config", "nvim-compe") -time([[Config for nvim-compe]], false) -- Config for: nvim-bufferline.lua time([[Config for nvim-bufferline.lua]], true) try_loadstring("\27LJ\1\0022\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\23plugins/bufferline\frequire\0", "config", "nvim-bufferline.lua") time([[Config for nvim-bufferline.lua]], false) +-- Config for: galaxyline.nvim +time([[Config for galaxyline.nvim]], true) +try_loadstring("\27LJ\1\0022\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\23plugins/galaxyline\frequire\0", "config", "galaxyline.nvim") +time([[Config for galaxyline.nvim]], false) -- Config for: vim-signify time([[Config for vim-signify]], true) try_loadstring("\27LJ\1\2/\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\20plugins/signify\frequire\0", "config", "vim-signify") @@ -216,18 +225,18 @@ time([[Config for vim-signify]], false) time([[Config for kommentary]], true) try_loadstring("\27LJ\1\2^\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\25update_commentstring&ts_context_commentstring.internal\frequire¾\1\1\0\4\0\a\0\n4\0\0\0%\1\1\0>\0\2\0027\0\2\0%\1\3\0003\2\4\0001\3\5\0:\3\6\2>\0\3\1G\0\1\0\18hook_function\0\1\0\2\31multi_line_comment_strings\tauto\31single_line_comment_string\tauto\20typescriptreact\23configure_language\22kommentary.config\frequire\0", "config", "kommentary") time([[Config for kommentary]], false) --- Config for: galaxyline.nvim -time([[Config for galaxyline.nvim]], true) -try_loadstring("\27LJ\1\0022\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\23plugins/galaxyline\frequire\0", "config", "galaxyline.nvim") -time([[Config for galaxyline.nvim]], false) +-- Config for: nvim-compe +time([[Config for nvim-compe]], true) +try_loadstring("\27LJ\1\2-\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\18plugins/compe\frequire\0", "config", "nvim-compe") +time([[Config for nvim-compe]], false) -- Config for: nvim-lspconfig time([[Config for nvim-lspconfig]], true) try_loadstring("\27LJ\1\2+\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\16plugins/lsp\frequire\0", "config", "nvim-lspconfig") time([[Config for nvim-lspconfig]], false) --- Config for: nvim-colorizer.lua -time([[Config for nvim-colorizer.lua]], true) -try_loadstring("\27LJ\1\0027\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\14colorizer\frequire\0", "config", "nvim-colorizer.lua") -time([[Config for nvim-colorizer.lua]], false) +-- Config for: nvim-tree.lua +time([[Config for nvim-tree.lua]], true) +try_loadstring("\27LJ\1\0021\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\22plugins/nvim-tree\frequire\0", "config", "nvim-tree.lua") +time([[Config for nvim-tree.lua]], false) if should_profile then save_profiles() end end) diff --git a/setup.sh b/setup.sh old mode 100644 new mode 100755 index aac4b5b..5624d3a --- a/setup.sh +++ b/setup.sh @@ -1,2 +1,12 @@ -git clone https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim - +[ -e ~/.local/share/nvim/site/pack/packer/start/packer.nvim ] || git clone https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim +npm i -g prettier_d_slim \ +diagnostic-languageserver \ +eslint_d \ +lua-fmt \ +typescript-language-server \ +typescript \ +vim-language-server \ +vscode-css-languageserver-bin \ +vscode-html-languageserver-bin \ +vscode-json-languageserver \ +vscode-langservers-extracted