Commit 4a65b4b
Expose lsp-bash-allowed-shell and improve warning (#4620)
* 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:
- b77aecf
But then reintroduced in:
- 771342f
* 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`.
* lsp-bash: Fix for unbound sh-shell
Fix the following test:
Test lsp-mock-doc-changes-wrong-version condition:
(void-variable sh-shell)
By only checking `lsp-bash-allowed-shells` when `sh-shell` is bound to a
value. For reasons that I'm not entirely clear about, this was fine
previously when checking against a static list.
---------
Co-authored-by: Jen-Chieh Shen <jcs090218@gmail.com>1 parent 7abfcc2 commit 4a65b4b
3 files changed
+16
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
| |||
65 | 71 | | |
66 | 72 | | |
67 | 73 | | |
68 | | - | |
| 74 | + | |
69 | 75 | | |
70 | | - | |
71 | | - | |
72 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
73 | 79 | | |
74 | 80 | | |
75 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9495 | 9495 | | |
9496 | 9496 | | |
9497 | 9497 | | |
9498 | | - | |
9499 | | - | |
9500 | | - | |
| 9498 | + | |
| 9499 | + | |
| 9500 | + | |
| 9501 | + | |
9501 | 9502 | | |
9502 | 9503 | | |
9503 | 9504 | | |
| |||
0 commit comments