Skip to content
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

Expose lsp-bash-allowed-shell and improve warning #4620

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dcarley
Copy link

@dcarley dcarley commented Nov 24, 2024

Fixes #4201

lsp-bash: Remove major mode duplication

These are already filtered by :major-modes so there's no need to
filter them again in the :activation-fn.

:major-modes was originally removed in:

But then reintroduced in:

lsp-bash: Expose lsp-bash-allowed-shells

Make the sh-shell values that are filtered by :activation-fn
configurable without needing to override lsp-bash-check-sh-shell

This allows people to allow values like bats and also makes it
slightly clearer why those values aren't supported by default when the
major mode is, which took me a long time to debug.

lsp-mode: Improve warning about :activation-fn

To make it easier to debug situations where the :major-mode is
supported but :activation-fn prevents the buffer from being supported
for other reasons, such as lsp-bash rejecting an sh-shell value of
bats.

These are already filtered by `:major-modes` so there's no need to
filter them again in the `:activation-fn`.

`:major-modes` was originally removed in:

- b77aecf

But then reintroduced in:

- 771342f
Make the `sh-shell` values that are filtered by `:activation-fn`
configurable without needing to override `lsp-bash-check-sh-shell`

This allows people to allow values like `bats` and also makes it
slightly clearer why those values aren't supported by default when the
major mode is, which took me a long time to debug.
To make it easier to debug situations where the `:major-mode` is
supported but `:activation-fn` prevents the buffer from being supported
for other reasons, such as `lsp-bash` rejecting an `sh-shell` value of
`bats`.
@github-actions github-actions bot added documentation client One or more of lsp-mode language clients labels Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client One or more of lsp-mode language clients documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make lsp-bash-check-sh-shell configurable
1 participant