nvim-FeMaco.lua icon indicating copy to clipboard operation
nvim-FeMaco.lua copied to clipboard

Detect FeMaco buffer on LSP attach

Open djromero opened this issue 3 years ago • 1 comments

First of all thanks for this plugin, is a great idea.

My problem: when I edit a code block with require('femaco.edit').edit_code_block() [1] the floating buffer recognizes the filetype (syntax highlighting works for example) but the LSP integration (nvim official) is not usable, depending on your configuraiton. For example, if normally errors will be shown in the gutter it won't be visible as there are no line numbers. Same thing with errors/warnings indicators in the status line or the quickfix (it's open in the buffer behing the floating one).

For example, I'd like to enable virtual text or underline to show errors but only in the floating buffer and disable some stuff. It's possible to detect a "FeMaco" buffer when LSP attachs to it?

Thanks!


[1] the command FeMaco does not exist for some reason, running neovim 0.8

djromero avatar Oct 09 '22 11:10 djromero

Hi @djromero!

[1] the command FeMaco does not exist for some reason, running neovim 0.8

did you call require('femaco').setup()?

For example, I'd like to enable virtual text or underline to show errors but only in the floating buffer and disable some stuff. It's possible to detect a "FeMaco" buffer when LSP attachs to it?

Could you do this in post_open_float callback-setting? There you can set any settings you wish for the buffer.

AckslD avatar Oct 10 '22 12:10 AckslD