Closed hheinzer closed 1 year ago
hi, can you show your nvim lspconfig? I just can't install lsp servers
Sure:
local on_attach = function(client, bufnr)
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
local bufopts = { noremap = true, silent = true, buffer = bufnr }
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
vim.keymap.set('n', '<leader>r', vim.lsp.buf.rename, bufopts)
vim.keymap.set('n', '<leader>F', vim.lsp.buf.format, bufopts)
end
local lsp_flags = {
debounce_text_changes = 150,
}
local capabilities = require('cmp_nvim_lsp').default_capabilities({
vim.lsp.protocol.make_client_capabilities()
})
require('lspconfig').fortls.setup({
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities,
cmd = {
'fortls',
'--notify_init',
'--sort_keywords',
'--lowercase_intrinsics',
'--hover_signature',
'--use_signature_help',
},
})
Yeah, thank you very much, last night I did take it and installed, but without attach, say pls, it is necessary use attach in installation?) Thank you
As I understand it, the on_attach
function defines the key mappings to interact with lsp. So when you press gd
, for example, you jump to the definition of the symbol under the cursor.
Yeah, but I install another lsp servers like pyright and rust_analyzer, there are work, but I don't don't attach
it
They might come with default key bindings. Doing it this way allows you to have the same key bindings across all lsp servers.
@gnikit , I updated the code tests. Could you review the changes?
@gnikit , I updated the code tests. Could you review the changes?
@folk85 Your Pull request is out of date, can you please rebase to master. I will have a look again
hi, can you show your nvim lspconfig? I just can't install lsp servers
@Act0r1 maybe this can be of help https://fortls.fortran-lang.org/editor_integration.html#neovim
hi, can you show your nvim lspconfig? I just can't install lsp servers
@Act0r1 maybe this can be of help https://fortls.fortran-lang.org/editor_integration.html#neovim
I already solved, thank you
@gnikit , I updated the code tests. Could you review the changes?
@folk85 Your Pull request is out of date, can you please rebase to master. I will have a look again
Done
Describe the bug To gfortran, it does not make a difference, if I use spaces around the
%
operator. However, if I use them, fortls is unable to find the symbol (jump to it's definition).To Reproduce In the following program, if you try to jump to the definition of
a
, it works. If you try to jump to the definition ofb
, it does not work. The code compiles and runs find, without any error or warnings under gfortran 13.1.1.I am using fortls 2.13.0 through neovim lsp. My configuration is
Expected behavior The cursor should jump to the definition of
b
, the same way it does fora
.