You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for some reason when we use this plugin vim.lsp.buf.hover stops working correctly, we have to press twice our key associated with the function to see the floating window, i think this is related to neovim/neovim#16625
here is the minimal reproducible example:
-- minimal.lualocalon_windows=vim.loop.os_uname().version:match'Windows'localfunctionjoin_paths(...)
localpath_sep=on_windowsand'\\' or'/'localresult=table.concat({ ... }, path_sep)
returnresultendvim.cmd[[set runtimepath=$VIMRUNTIME]]localtemp_dir=vim.loop.os_getenv'TEMP' or'/tmp'vim.cmd('set packpath=' ..join_paths(temp_dir, 'nvim', 'site'))
localpackage_root=join_paths(temp_dir, 'nvim', 'site', 'pack')
locallspconfig_path=join_paths(package_root, 'test', 'start', 'nvim-lspconfig')
localstatusline_path=join_paths(package_root, 'test', 'start', 'statusline')
ifvim.fn.isdirectory(lspconfig_path) ~=1thenvim.fn.system { 'git', 'clone', 'https://github.com/neovim/nvim-lspconfig', lspconfig_path }
vim.fn.system { 'git', 'clone', 'https://github.com/beauwilliams/statusline.lua', statusline_path }
endrequire('statusline')
vim.lsp.set_log_level'trace'require('vim.lsp.log').set_format_func(vim.inspect)
localnvim_lsp=require'lspconfig'localon_attach=function(_, bufnr)
localfunctionbuf_set_option(...)
vim.api.nvim_buf_set_option(bufnr, ...)
endbuf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
-- Mappings.localopts= { buffer=bufnr, noremap=true, silent=true }
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts)
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, opts)
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, opts)
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, opts)
vim.keymap.set('n', '<space>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, opts)
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, opts)
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, opts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts)
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
end-- Add the server that troubles you herelocalname='pyright'localcmd= { 'pyright-langserver', '--stdio' } -- needed for elixirls, omnisharp, sumneko_luaifnotnamethenprint'You have not defined a server name, please edit minimal_init.lua'endifnotnvim_lsp[name].document_config.default_config.cmdandnotcmdthenprint[[You have not defined a server default cmd for a server that requires it please edit minimal_init.lua]]endnvim_lsp[name].setup {
cmd=cmd,
on_attach=on_attach,
}
print[[You can find your log at $HOME/.cache/nvim/lsp.log. Please paste in a github issue under a details tag as described in the issue template.]]
if it throws an error started statusline you just have to delete /tmp/nvim
how to reproduce: touch main.py echo "import os\nos.listdir()" > main.py nvim -u minimal.lua main.py
The text was updated successfully, but these errors were encountered:
for some reason when we use this plugin
vim.lsp.buf.hover
stops working correctly, we have to press twice our key associated with the function to see the floating window, i think this is related to neovim/neovim#16625here is the minimal reproducible example:
if it throws an error started statusline you just have to delete
/tmp/nvim
how to reproduce:
touch main.py
echo "import os\nos.listdir()" > main.py
nvim -u minimal.lua main.py
The text was updated successfully, but these errors were encountered: