From 27dff38b7cb1edac7f64637196d0b6c0c474f5fe Mon Sep 17 00:00:00 2001 From: Laily Date: Mon, 29 Apr 2024 19:06:42 +0800 Subject: [PATCH] fix: new lsp --- fish/config.fish | 3 ++- nvim/lua/plugins/nvim-lspconfig.lua | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/fish/config.fish b/fish/config.fish index 6be8f09..6fcc9d9 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -26,8 +26,9 @@ alias gtc="go test -gcflags=all=-l -cover ./..." alias swg="swag init -o docs -g " alias sws="swagger serve -F=swagger" + function gtr - go test -gcflags=all=-l -v -run="$1" + go test -gcflags=all=-l -v -run=$argv end diff --git a/nvim/lua/plugins/nvim-lspconfig.lua b/nvim/lua/plugins/nvim-lspconfig.lua index 6b0701c..96d0ce2 100644 --- a/nvim/lua/plugins/nvim-lspconfig.lua +++ b/nvim/lua/plugins/nvim-lspconfig.lua @@ -134,6 +134,21 @@ return { init_options = { usePlaceholders = true, completeUnimported = true }, }, }, + pylsp = { + setup = { + cmd = { "pylyzer", "--server" }, + filetypes = { "python" }, + settings = { + python = { + checkOnType = false, + diagnostics = true, + inlayHints = true, + smartCompletion = true + } + }, + single_file_support = true, + } + } }, setup = {}, },