vim-lsp icon indicating copy to clipboard operation
vim-lsp copied to clipboard

Add per-file LSP activation rules allowpaths, blockpaths

Open pavoljuhas opened this issue 2 years ago • 6 comments

Add optional items allowpaths, blockpaths for the server_info dictionary. allowpaths and blockpaths are lists of regular expressions matched on the full path of the active file. LSP is enabled if the current buffer matches any pattern in the allowpaths or when allowpaths is not present in the server_info dictionary. LSP is disabled if any of the blockpaths patterns matches the current file. The blockpaths rule has priority when both allowpaths and blockpaths match.

The allowpaths and blockpaths are consulted only when LSP is enabled by the allowlist, blocklist rules for buffer filetypes.

Fixes #1041

pavoljuhas avatar Oct 18 '22 17:10 pavoljuhas

Can we use a function instead of a list, such that any custom code can be allowed?

prabirshrestha avatar Oct 22 '22 21:10 prabirshrestha

Sure, I'll get to it in next few days.

pavoljuhas avatar Oct 26 '22 02:10 pavoljuhas

Can you also fix the lint issues. Do sync with the latest master branch too.

prabirshrestha avatar Dec 03 '22 17:12 prabirshrestha

I'm seeking for lsp that can be manually enabled on a per project basis, because I want to avoid resource usage for files I read and copy from.

lilydjwg avatar Feb 17 '23 17:02 lilydjwg

@pavoljuhas Are you still interested in merging this PR? Would you mind addressing the feedback? Thanks!

pusewicz avatar May 15 '23 13:05 pusewicz

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 12 '23 21:08 stale[bot]