diff options
| author | glepnir <glephunter@gmail.com> | 2025-01-02 15:26:38 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-02 15:26:38 +0800 |
| commit | 88c4c042e1e59f992e4c7aff3531033047b3aa9c (patch) | |
| tree | 4e0c7e7691f223a1895e3bf58eae7c5b20cd0886 /lua/lspconfig/configs/ccls.lua | |
| parent | fix(ccls): typo on request method (#3536) (diff) | |
| download | nvim-lspconfig-88c4c042e1e59f992e4c7aff3531033047b3aa9c.tar nvim-lspconfig-88c4c042e1e59f992e4c7aff3531033047b3aa9c.tar.gz nvim-lspconfig-88c4c042e1e59f992e4c7aff3531033047b3aa9c.tar.bz2 nvim-lspconfig-88c4c042e1e59f992e4c7aff3531033047b3aa9c.tar.lz nvim-lspconfig-88c4c042e1e59f992e4c7aff3531033047b3aa9c.tar.xz nvim-lspconfig-88c4c042e1e59f992e4c7aff3531033047b3aa9c.tar.zst nvim-lspconfig-88c4c042e1e59f992e4c7aff3531033047b3aa9c.zip | |
refactor(clangd): imporve switchsourceheader handler (#3537)
Diffstat (limited to 'lua/lspconfig/configs/ccls.lua')
| -rw-r--r-- | lua/lspconfig/configs/ccls.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lua/lspconfig/configs/ccls.lua b/lua/lspconfig/configs/ccls.lua index 9583fcb0..e64df3c6 100644 --- a/lua/lspconfig/configs/ccls.lua +++ b/lua/lspconfig/configs/ccls.lua @@ -1,13 +1,14 @@ local util = require 'lspconfig.util' local function switch_source_header(bufnr) + local method_name = 'textDocument/switchSourceHeader' bufnr = util.validate_bufnr(bufnr) local client = util.get_active_client_by_name(bufnr, 'ccls') if not client then - vim.notify('method textdocument/switchsourceheader is not supported by any servers active on the current buffer') + return vim.notify(('method %s is not supported by any servers active on the current buffer'):format(method_name)) end local params = vim.lsp.util.make_text_document_params(bufnr) - client.request('textDocument/switchsourceheader', params, function(err, result) + client.request(method_name, params, function(err, result) if err then error(tostring(err)) end |
