-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add per-file LSP activation rules allowpaths, blockpaths #1380
base: master
Are you sure you want to change the base?
Conversation
`allowpaths` and `blockpaths` are lists of regular expressions matched with the full path of the active file. LSP is enabled if it matches any pattern in the `allowpaths` list or when `allowpaths` is not present in the server_info dictionary. LSP is disabled if any of the `blockpaths` patterns matches the current buffer. The `blockpaths` rule has priority when both `allowpaths` and `blockpaths` match. The `allowpaths` and `blockpaths` are evaluated only if the LSP is enabled by the `allowlist`, `blocklist` rules for buffer filetypes.
A single `*` pattern in `allowpaths` or `blockpaths` matches everything. All other patterns are evaluated and matched as regular expressions.
Can we use a function instead of a list, such that any custom code can be allowed? |
Sure, I'll get to it in next few days. |
Can you also fix the lint issues. Do sync with the latest master branch too. |
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. |
@pavoljuhas Are you still interested in merging this PR? Would you mind addressing the feedback? Thanks! |
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. |
Add optional items
allowpaths
,blockpaths
for theserver_info
dictionary.allowpaths
andblockpaths
are lists of regular expressions matchedon the full path of the active file. LSP is enabled if the current buffer
matches any pattern in the
allowpaths
or whenallowpaths
is notpresent in the server_info dictionary. LSP is disabled if any of the
blockpaths
patterns matches the current file. Theblockpaths
rulehas priority when both
allowpaths
andblockpaths
match.The
allowpaths
andblockpaths
are consulted only when LSP isenabled by the
allowlist
,blocklist
rules for buffer filetypes.Fixes #1041