-
Notifications
You must be signed in to change notification settings - Fork 42
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
Error executing vim.schedule lua callback #9
Comments
Sorry, I missed than on_attach = function(client)
apply_settings()
lsp_status.on_attach(client)
vim.api.nvim_buf_set_keymap(0, 'n', 'gs', '<Cmd>ClangdSwitchSourceHeader<CR>', {noremap=true, silent=true})
end |
Glad to hear you figured it out! If you have suggestions for improvements to the docs to make that more clear, I'd welcome them. |
I have a similar issue:
this is my setup: local nvim_status = require("lsp-status")
local status = {}
status.select_symbol = function(cursor_pos, symbol)
if symbol.valueRange then
local value_range = {
["start"] = {
character = 0,
line = vim.fn.byte2line(symbol.valueRange[1]),
},
["end"] = {
character = 0,
line = vim.fn.byte2line(symbol.valueRange[2]),
},
}
return require("lsp-status.util").in_range(cursor_pos, value_range)
end
end
status.activate = function()
nvim_status.register_progress()
nvim_status.config {
select_symbol = status.select_symbol
}
end
status.on_attach = function(client)
nvim_status.on_attach(client)
vim.cmd [[augroup dev_lsp_status]]
vim.cmd [[ autocmd CursorHold,BufEnter <buffer> lua require('lsp-status').update_current_function()]]
vim.cmd [[augroup END]]
end
return status And here the usage in my lsp configuration: local nvim_lsp = require('lspconfig')
local status = require("_lsp_status")
status.activate()
-- lsp config
local opts = {silent = true}
local custom_attach = function(client)
status.on_attach(client)
-- lsp keymaps below here
end |
Hi @koopa1338: Please open a new issue for your bug, which appears to be distinct from the original issue in this thread. |
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for the awesome plugin! It works for me, but I have weird error in echo area:
Here is my configuration:
The text was updated successfully, but these errors were encountered: