From 12b240dc21a098ab0c6ddca27a8333c1afd503b6 Mon Sep 17 00:00:00 2001 From: FollieHiyuki Date: Mon, 18 Oct 2021 21:25:08 +0700 Subject: [PATCH] neovim: lsp: clean up lsp install scripts --- home/.config/nvim/lua/plugins.lua | 2 +- home/.config/nvim/scripts/lsp/cmake | 5 ----- home/.config/nvim/scripts/lsp/efm | 5 ----- home/.config/nvim/scripts/lsp/gopls | 5 ----- home/.config/nvim/scripts/lsp/sqls | 5 ----- 5 files changed, 1 insertion(+), 21 deletions(-) diff --git a/home/.config/nvim/lua/plugins.lua b/home/.config/nvim/lua/plugins.lua index 86e4bb5..0b27cf4 100644 --- a/home/.config/nvim/lua/plugins.lua +++ b/home/.config/nvim/lua/plugins.lua @@ -404,7 +404,7 @@ return packer.startup(function(use) wants = {'plenary.nvim', 'nvim-treesitter'}, config = tools.rest_conf } - use { + use { -- TODO: check out auto-session + session-lens 'folke/persistence.nvim', event = 'BufReadPre', keys = 's', diff --git a/home/.config/nvim/scripts/lsp/cmake b/home/.config/nvim/scripts/lsp/cmake index cf19be9..0793dca 100755 --- a/home/.config/nvim/scripts/lsp/cmake +++ b/home/.config/nvim/scripts/lsp/cmake @@ -1,13 +1,8 @@ #!/bin/sh -current_path="$PWD" server_path="${XDG_DATA_HOME:-$HOME/.local/share}/nvim/lsp/cmake" - [ ! -d "${server_path}" ] && mkdir -p "${server_path}" -cd ${server_path} python3 -m venv ${server_path}/venv ${server_path}/venv/bin/pip3 install -U pip ${server_path}/venv/bin/pip3 install -U cmake-language-server - -cd ${current_path} diff --git a/home/.config/nvim/scripts/lsp/efm b/home/.config/nvim/scripts/lsp/efm index e533cb7..64c799e 100755 --- a/home/.config/nvim/scripts/lsp/efm +++ b/home/.config/nvim/scripts/lsp/efm @@ -1,12 +1,7 @@ #!/bin/sh -current_path="$PWD" server_path="${XDG_DATA_HOME:-$HOME/.local/share}/nvim/lsp/efm" - [ ! -d "${server_path}" ] && mkdir -p "${server_path}" -cd ${server_path} GOPATH="${server_path}" GOBIN="${server_path}" go install github.com/mattn/efm-langserver@latest GOPATH="${server_path}" GOBIN="${server_path}" go clean -modcache - -cd ${current_path} diff --git a/home/.config/nvim/scripts/lsp/gopls b/home/.config/nvim/scripts/lsp/gopls index 7266124..485b97e 100755 --- a/home/.config/nvim/scripts/lsp/gopls +++ b/home/.config/nvim/scripts/lsp/gopls @@ -1,12 +1,7 @@ #!/bin/sh -current_path="$PWD" server_path="${XDG_DATA_HOME:-$HOME/.local/share}/nvim/lsp/gopls" - [ ! -d "${server_path}" ] && mkdir -p "${server_path}" -cd ${server_path} GOPATH="${server_path}" GOBIN="${server_path}" go install golang.org/x/tools/gopls@latest GOPATH="${server_path}" GOBIN="${server_path}" go clean -modcache - -cd ${current_path} diff --git a/home/.config/nvim/scripts/lsp/sqls b/home/.config/nvim/scripts/lsp/sqls index 3749810..576ecc8 100755 --- a/home/.config/nvim/scripts/lsp/sqls +++ b/home/.config/nvim/scripts/lsp/sqls @@ -1,12 +1,7 @@ #!/bin/sh -current_path="$PWD" server_path="${XDG_DATA_HOME:-$HOME/.local/share}/nvim/lsp/sqls" - [ ! -d "${server_path}" ] && mkdir -p "${server_path}" -cd ${server_path} GOPATH="${server_path}" GOBIN="${server_path}" go install github.com/lighttiger2505/sqls@latest GOPATH="${server_path}" GOBIN="${server_path}" go clean -modcache - -cd ${current_path}