Skip to content
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

Merged
merged 1 commit into from
Jan 2, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lua/lspconfig/configs/ccls.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here

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)
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Member Author

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

Copy link
Contributor

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...

if err then
error(tostring(err))
end
Expand Down
Loading