diff options
| author | William Boman <william@redwill.se> | 2022-04-29 13:14:57 +0200 |
|---|---|---|
| committer | William Boman <william@redwill.se> | 2022-04-29 13:15:46 +0200 |
| commit | 48abdc9d32f56e038f4aca478cf6d5a1628b8286 (patch) | |
| tree | 0fbf2b70c0c0446cf058f8cb9789d4705b2c80c3 /lua/nvim-lsp-installer/servers | |
| parent | feat: add ensure_installed to setup table (#637) (diff) | |
| download | mason-48abdc9d32f56e038f4aca478cf6d5a1628b8286.tar mason-48abdc9d32f56e038f4aca478cf6d5a1628b8286.tar.gz mason-48abdc9d32f56e038f4aca478cf6d5a1628b8286.tar.bz2 mason-48abdc9d32f56e038f4aca478cf6d5a1628b8286.tar.lz mason-48abdc9d32f56e038f4aca478cf6d5a1628b8286.tar.xz mason-48abdc9d32f56e038f4aca478cf6d5a1628b8286.tar.zst mason-48abdc9d32f56e038f4aca478cf6d5a1628b8286.zip | |
docs: more deprecations and update some outdated docs
Diffstat (limited to 'lua/nvim-lsp-installer/servers')
| -rw-r--r-- | lua/nvim-lsp-installer/servers/eslint/README.md | 57 | ||||
| -rw-r--r-- | lua/nvim-lsp-installer/servers/zeta_note/init.lua | 1 |
2 files changed, 5 insertions, 53 deletions
diff --git a/lua/nvim-lsp-installer/servers/eslint/README.md b/lua/nvim-lsp-installer/servers/eslint/README.md index c3a115de..a8c2a301 100644 --- a/lua/nvim-lsp-installer/servers/eslint/README.md +++ b/lua/nvim-lsp-installer/servers/eslint/README.md @@ -1,43 +1,6 @@ # eslint -## Enabling document formatting - -To make the `eslint` server respond to `textDocument/formatting` LSP requests, you need to manually enable this -setting. This is done when setting up the LSP server, like so: - -```lua -local lsp_installer = require "nvim-lsp-installer" - -function common_on_attach(client, bufnr) - -- add your code here -end - -lsp_installer.on_server_ready(function (server) - local opts = { - on_attach = common_on_attach, - } - - if server.name == "eslint" then - opts.on_attach = function (client, bufnr) - -- neovim's LSP client does not currently support dynamic capabilities registration, so we need to set - -- the resolved capabilities of the eslint server ourselves! - client.resolved_capabilities.document_formatting = true - common_on_attach(client, bufnr) - end - opts.settings = { - format = { enable = true }, -- this will enable formatting - } - end - - server:setup(opts) -end) -``` - -This will make `eslint` respond to formatting requests, for example when triggered through: - -- `:lua vim.lsp.buf.formatting()` -- `:lua vim.lsp.buf.formatting_seq_sync()` -- `:lua vim.lsp.buf.formatting_sync()` +*NOTE*: You will have to install the [`eslint` package](https://www.npmjs.com/package/eslint) either locally or globally for the server to run successfully. ## Eslint in projects that use pnp @@ -45,18 +8,8 @@ To allow the `eslint` server to resolve eslint and eslint plugins in a project t command used to run the server. This is done when setting up the LSP server, like so: ```lua -lsp_installer.on_server_ready(function (server) - local opts = { - on_attach = common_on_attach, - } - - if server.name == "eslint" then - local eslint_config = require("lspconfig.server_configurations.eslint") - opts.cmd = { "yarn", "exec", unpack(eslint_config.default_config.cmd) } - end - - server:setup(opts) -end) +local eslint_config = require("lspconfig.server_configurations.eslint") +lspconfig.eslint.setup { + opts.cmd = { "yarn", "exec", unpack(eslint_config.default_config.cmd) } +} ``` - -*NOTE*: You will have to install the [`eslint` package](https://www.npmjs.com/package/eslint) either locally or globally for the server to run successfully. diff --git a/lua/nvim-lsp-installer/servers/zeta_note/init.lua b/lua/nvim-lsp-installer/servers/zeta_note/init.lua index 2658772e..3db58620 100644 --- a/lua/nvim-lsp-installer/servers/zeta_note/init.lua +++ b/lua/nvim-lsp-installer/servers/zeta_note/init.lua @@ -28,7 +28,6 @@ return function(name, root_dir) std.chmod("+x", { "zeta-note" }) end, default_options = { - cmd = { "zeta-note" }, cmd_env = { PATH = process.extend_path { root_dir }, }, |
