-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ccls): typo on request method #3536
Conversation
Problem: method prefix is textDocument Solution: make d to upper
@@ -7,7 +7,7 @@ local function switch_source_header(bufnr) | |||
vim.notify('method textdocument/switchsourceheader is not supported by any servers active on the current buffer') | |||
end | |||
local params = vim.lsp.util.make_text_document_params(bufnr) | |||
client.request('textdocument/switchsourceheader', params, function(err, result) | |||
client.request('textDocument/switchsourceheader', params, function(err, result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The correct spelling is textDocument/switchSourceHeader
and the message above needs to be fixed as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will fix on refactor PR there lots of duplicate codes on clangd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switchsourceheader
is correct? in clangd is switchSourceHeader
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
textDocument/switchSourceHeader
, the same as clangd :)
I had used the function copied from clangd for a while https://github.com/MaskRay/Config/blob/1f431c999079e900bbe7958a00578cba4c4b3b67/home/.config/nvim/lua/my/util.lua#L41 until I attempted to upstream it...
@@ -7,7 +7,7 @@ local function switch_source_header(bufnr) | |||
vim.notify('method textdocument/switchsourceheader is not supported by any servers active on the current buffer') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here
Problem: method prefix is textDocument
Solution: make d to upper