diff options
| author | kylo252 <[email protected]> | 2022-01-08 14:24:05 +0100 | 
|---|---|---|
| committer | GitHub <[email protected]> | 2022-01-08 14:24:05 +0100 | 
| commit | 4a66d4752d06cfe0452c55ee5f2b20f84d19c3bb (patch) | |
| tree | e5b55cda6903fa1712d0b3c63f701498150a9082 /utils/installer | |
| parent | 6740afd743a05028cc48e8f1e203e7f81345aced (diff) | |
fix(null-ls): avoid sending invalid opts.args (#2154)
Diffstat (limited to 'utils/installer')
| -rw-r--r-- | utils/installer/config.example.lua | 35 | 
1 files changed, 12 insertions, 23 deletions
| diff --git a/utils/installer/config.example.lua b/utils/installer/config.example.lua index e3d9fa23..e209e7af 100644 --- a/utils/installer/config.example.lua +++ b/utils/installer/config.example.lua @@ -91,8 +91,8 @@ lvim.builtin.treesitter.highlight.enabled = true  -- local opts = {} -- check the lspconfig documentation for a list of all possible options  -- require("lvim.lsp.manager").setup("pylsp", opts) --- you can set a custom on_attach function that will be used for all the language servers --- See <https://github.com/neovim/nvim-lspconfig#keybindings-and-completion> +-- -- you can set a custom on_attach function that will be used for all the language servers +-- -- See <https://github.com/neovim/nvim-lspconfig#keybindings-and-completion>  -- lvim.lsp.on_attach_callback = function(client, bufnr)  --   local function buf_set_option(...)  --     vim.api.nvim_buf_set_option(bufnr, ...) @@ -100,30 +100,18 @@ lvim.builtin.treesitter.highlight.enabled = true  --   --Enable completion triggered by <c-x><c-o>  --   buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")  -- end --- you can overwrite the null_ls setup table (useful for setting the root_dir function) --- lvim.lsp.null_ls.setup.root_dir = require("lspconfig").util.root_pattern("Makefile", ".git", "node_modules") --- or if you need something more advanced --- lvim.lsp.null_ls.setup.root_dir = function(fname) ---   if vim.bo.filetype == "javascript" then ---     return require("lspconfig/util").root_pattern("Makefile", ".git", "node_modules")(fname) ---       or require("lspconfig/util").path.dirname(fname) ---   elseif vim.bo.filetype == "php" then ---     return require("lspconfig/util").root_pattern("Makefile", ".git", "composer.json")(fname) or vim.fn.getcwd() ---   else ---     return require("lspconfig/util").root_pattern("Makefile", ".git")(fname) or require("lspconfig/util").path.dirname(fname) ---   end --- end  -- -- set a formatter, this will override the language server formatting capabilities (if it exists)  -- local formatters = require "lvim.lsp.null-ls.formatters"  -- formatters.setup { ---   { exe = "black", filetypes = { "python" } }, ---   { exe = "isort", filetypes = { "python" } }, +--   { command = "black", filetypes = { "python" } }, +--   { command = "isort", filetypes = { "python" } },  --   { ---     exe = "prettier", +--     -- each formatter accepts a list of options identical to https://github.com/jose-elias-alvarez/null-ls.nvim/blob/main/doc/BUILTINS.md#Configuration +--     command = "prettier",  --     ---@usage arguments to pass to the formatter  --     -- these cannot contain whitespaces, options such as `--line-width 80` become either `{'--line-width', '80'}` or `{'--line-width=80'}` ---     args = { "--print-with", "100" }, +--     extra_args = { "--print-with", "100" },  --     ---@usage specify which filetypes to enable. By default a providers will attach to all the filetypes it supports.  --     filetypes = { "typescript", "typescriptreact" },  --   }, @@ -132,15 +120,16 @@ lvim.builtin.treesitter.highlight.enabled = true  -- -- set additional linters  -- local linters = require "lvim.lsp.null-ls.linters"  -- linters.setup { ---   { exe = "flake8", filetypes = { "python" } }, +--   { command = "flake8", filetypes = { "python" } },  --   { ---     exe = "shellcheck", +--     -- each linter accepts a list of options identical to https://github.com/jose-elias-alvarez/null-ls.nvim/blob/main/doc/BUILTINS.md#Configuration +--     command = "shellcheck",  --     ---@usage arguments to pass to the formatter  --     -- these cannot contain whitespaces, options such as `--line-width 80` become either `{'--line-width', '80'}` or `{'--line-width=80'}` ---     args = { "--severity", "warning" }, +--     extra_args = { "--severity", "warning" },  --   },  --   { ---     exe = "codespell", +--     command = "codespell",  --     ---@usage specify which filetypes to enable. By default a providers will attach to all the filetypes it supports.  --     filetypes = { "javascript", "python" },  --   }, | 
