aboutsummaryrefslogtreecommitdiffstats
path: root/lsp/ts_ls.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2025-04-26 06:01:04 -0700
committerGitHub <noreply@github.com>2025-04-26 06:01:04 -0700
commit85e09220a878b19e62eec98872db4c74f711d167 (patch)
tree84460d3ee438c5a168675f1a94949c6d8eae972c /lsp/ts_ls.lua
parentdocs: update configs.md (diff)
downloadnvim-lspconfig-85e09220a878b19e62eec98872db4c74f711d167.tar
nvim-lspconfig-85e09220a878b19e62eec98872db4c74f711d167.tar.gz
nvim-lspconfig-85e09220a878b19e62eec98872db4c74f711d167.tar.bz2
nvim-lspconfig-85e09220a878b19e62eec98872db4c74f711d167.tar.lz
nvim-lspconfig-85e09220a878b19e62eec98872db4c74f711d167.tar.xz
nvim-lspconfig-85e09220a878b19e62eec98872db4c74f711d167.tar.zst
nvim-lspconfig-85e09220a878b19e62eec98872db4c74f711d167.zip
ci: check legacy configs, drop "comment" #3781
- Disallow adding new legacy configs. - Drop the "comment" CI job. It is over-engineered, and adds redundant comments on PRs.
Diffstat (limited to 'lsp/ts_ls.lua')
-rw-r--r--lsp/ts_ls.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/lsp/ts_ls.lua b/lsp/ts_ls.lua
index 37f30f1e..c3e8e1b9 100644
--- a/lsp/ts_ls.lua
+++ b/lsp/ts_ls.lua
@@ -29,7 +29,9 @@
--- }
--- ```
---
---- Source actions such as organizing imports and removing unused code are available via `:LspTypescriptSourceAction`.
+--- Use the `:LspTypescriptSourceAction` command to see "whole file" ("source") code-actions such as:
+--- - organize imports
+--- - remove unused code
---
--- ### Vue support
---
@@ -83,7 +85,7 @@ return {
handlers = {
-- handle rename request for certain code actions like extracting functions / types
['_typescript.rename'] = function(_, result, ctx)
- local client = vim.lsp.get_client_by_id(ctx.client_id)
+ local client = assert(vim.lsp.get_client_by_id(ctx.client_id))
vim.lsp.util.show_document({
uri = result.textDocument.uri,
range = {
@@ -96,7 +98,7 @@ return {
end,
},
on_attach = function(client)
- -- ts_ls provides code actions that have a prefix `source.` that apply to the whole file. These will only appear in
+ -- ts_ls provides `source.*` code actions that apply to the whole file. These only appear in
-- `vim.lsp.buf.code_action()` if specified in `context.only`.
vim.api.nvim_buf_create_user_command(0, 'LspTypescriptSourceAction', function()
local source_actions = vim.tbl_filter(function(action)