Skip to content
This repository has been archived by the owner on Jul 6, 2021. It is now read-only.

Feature request: per-buffer/window options #47

Open
runiq opened this issue Jul 19, 2020 · 2 comments
Open

Feature request: per-buffer/window options #47

runiq opened this issue Jul 19, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@runiq
Copy link

runiq commented Jul 19, 2020

I'd like to be able to set the virtual text prefix to the current filetype's comment string, so I can copy stuff out of the terminal and e.g. paste it into a REPL.

Thanks for this addon, it's great :)

@haorenW1025 haorenW1025 added the enhancement New feature or request label Jul 21, 2020
@Iron-E
Copy link
Contributor

Iron-E commented Jul 25, 2020

You can do this with Vim by using after and ftplugin files. Just make sure filetype plugin on is in your init.vim.

For example, in the folder that your init.vim goes, you could this to a file named after/ftplugin/<filetype>/diagnostic.vim:

let g:diagnostic_virtual_text_prefix = '<comment string>'

Perhaps a b: version of the variables also would work here.

@runiq
Copy link
Author

runiq commented Jul 27, 2020

What about making things configurable at the on_attach() level? As in, give the on_attach() function an optional config table with keys that correspond to the g:diagnostic_* options.

Would you consider a PR that implements those?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants