Closed Cartogy closed 3 years ago
You are lazy loading a lazy load. Your filetype autocommand is calling a function which maps a filetype autocommand which can't be called because the buffer filetype trigger was already called (and which mapped it).
I see. Thanks for the quick response. There is a lot for me to learn.
Those who use lazy.nvim could face the same problem https://github.com/folke/lazy.nvim/issues/880 for the same reason
nvim --version
: v0.6.0-dev+132-g7d2233fadInstalled nvim-lspconfig via pathogen
When requesting the Lspconfig for a filetype via
it does not activate linting. Only after the autocommand is called twice will the linting work.
Yet when calling the require command without the FileType autocommand, it activates linting:
Temporary solution
I found a workaround that activates the lsp depending on the filetype.
How to reproduce the problem from neovim startup
Install:
Actual behaviour
LSP does not show linting
Expected behaviour
Have LSP show linting
Minimal init.vim or init.lua and code sample
Python Code for testing
The LSP should show '"var" is not defined'
C++ Code for testing
The LSP should show 'Use of undeclared identifier 'endl'; did you mean 'std::endl'? (fix available)
Health check
Checkhealth result
LSP log
Log file
Not executing request ``` [ START ] 2021-08-12T20:39:46-0500 ] LSP logging initiated [ INFO ] 2021-08-12T20:39:56-0500 ] ...