Commit 2f41b83
authored
LSP: Refresh internal caches when settings are updated (#1273)
We use the pull model (`workspace/configuration`) to get settings for a
document and we cache these internally so we don't repeat these calls
multiple times for a given request. We're set up to listen for
configuration refresh notifications and update the project settings when
we get them.
Unfortunately, we didn't actually _register_ for these notifications, so
we never got them. This meant that if you changed the settings for an
already opened file or workspace folder, the language server would not
react to these changes. This PR fixes this by registering for
configuration change notifications and now open files with color
decorators, completions, etc… should react to changes in the settings as
needed.
If settings are updated and our langauge server doesn't react to or
handle these changes, it is definitely a bug. Hopefully this will squash
all of those particular ones but… we'll see. 😅1 parent 182600d commit 2f41b83
File tree
3 files changed
+10
-5
lines changed- packages
- tailwindcss-language-server/src
- vscode-tailwindcss
3 files changed
+10
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1181 | 1181 | | |
1182 | 1182 | | |
1183 | 1183 | | |
1184 | | - | |
1185 | | - | |
1186 | | - | |
1187 | | - | |
1188 | | - | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
1189 | 1187 | | |
1190 | 1188 | | |
1191 | 1189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
799 | 800 | | |
800 | 801 | | |
801 | 802 | | |
| 803 | + | |
802 | 804 | | |
803 | 805 | | |
804 | 806 | | |
| |||
810 | 812 | | |
811 | 813 | | |
812 | 814 | | |
| 815 | + | |
| 816 | + | |
813 | 817 | | |
814 | 818 | | |
815 | 819 | | |
816 | 820 | | |
817 | 821 | | |
| 822 | + | |
818 | 823 | | |
| 824 | + | |
819 | 825 | | |
820 | 826 | | |
821 | 827 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
0 commit comments