diff --git a/.luarc.json b/.luarc.json new file mode 100644 index 0000000..26f441d --- /dev/null +++ b/.luarc.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json", + "Lua.workspace.library": [ + "${3rd}/luassert/library" + ] +} \ No newline at end of file diff --git a/lua/configs/lspconfig.lua b/lua/configs/lspconfig.lua index 4d1e956..32a5e71 100644 --- a/lua/configs/lspconfig.lua +++ b/lua/configs/lspconfig.lua @@ -85,7 +85,10 @@ function M.config() lsp_highlight_document(client) end + local sumneko_root_path = '/home/peters/builds/lua-language-server' + local sumneko_binary = sumneko_root_path.."/bin/lua-language-server" lspconfig.sumneko_lua.setup { + cmd = { sumneko_binary, "-E", sumneko_root_path .. "/main.lua" }, on_attach = on_attach, settings = { Lua = { @@ -95,10 +98,40 @@ function M.config() diagnostics = { globals = { 'vim' }, }, - } - } + workspace = { + library = { + -- include neovim runtime files + [vim.fn.expand('$VIMRUNTIME/lua')] = true, + [vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true, + }, + checkThirdParty = false, -- disable "do you want to set up the workspace" + }, + telemetry = { + enable = false, + } + }, + }, } + lspconfig.pyright.setup { + on_attach = on_attach, + } + + -- TODO: python-language-server (pip install pylsp) + -- lspconfig.pylsp.setup { + -- -- cmd = { '/home/peters/.env38/bin/pylsp' }, + -- on_attach = on_attach, + -- settings = { + -- pylsp = { + -- plugins = { + -- -- pylint = { + -- -- enabled = false, + -- -- }, + -- } + -- } + -- } + -- } + end return M diff --git a/lua/configs/mason-lspconfig.lua b/lua/configs/mason-lspconfig.lua deleted file mode 100644 index 94e2dec..0000000 --- a/lua/configs/mason-lspconfig.lua +++ /dev/null @@ -1,16 +0,0 @@ -local M = {} - -function M.config() - local status_ok, mason_lspconfig = pcall(require, "mason-lspconfig") - if not status_ok then - return - end - - mason_lspconfig.setup({ - ensure_installed = { - }, - automatic_installation = false, - }) -end - -return M diff --git a/lua/configs/mason.lua b/lua/configs/mason.lua deleted file mode 100644 index 9eedada..0000000 --- a/lua/configs/mason.lua +++ /dev/null @@ -1,13 +0,0 @@ -local M = {} - -function M.config() - local status_ok, mason = pcall(require, "mason") - if not status_ok then - return - end - - mason.setup {} - -end - -return M diff --git a/lua/plugins.lua b/lua/plugins.lua index caa444a..d4d962e 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -95,21 +95,10 @@ packer.startup { config = function() vim.g.cursorhold_updatetime = 300 end, } - -- LSP EZ Installer - -- :LspInstall - use { - 'williamboman/mason.nvim', - config = function() require'configs.mason'.config() end - } - use { - 'williamboman/mason-lspconfig', - config = function() require'configs.mason-lspconfig'.config() end - } - -- Built-In LSP Config use { 'neovim/nvim-lspconfig', - event = 'BufRead', + -- event = 'BufRead', config = function() require'configs.lspconfig'.config() end } diff --git a/python-lsp-reqs/requirements.txt b/python-lsp-reqs/requirements.txt new file mode 100644 index 0000000..9e55866 --- /dev/null +++ b/python-lsp-reqs/requirements.txt @@ -0,0 +1,5 @@ +python-lsp-server +pylsp-mypy +pyls-isort +python-lsp-black +