sublimetextlanguage-server-protocolsublimetext4

SublimeText4: How to disable LSP-typescript for specific directories?


I have LSP and LSP-typescript packages installed.

I also have directory with typescript code snippets (read: gists), which i sometimes open with sublime. When i interact with such a snippet, i usually get some typecript syntax warnings, coming from LSP. Incorrect syntax in this case is OK of course, because snippets are examples with unmet dependencies, missing constants etc...

Is there an option to disable LSP in such directories where I do not want any checks to be performed?


Solution

  • Apparently it is not possible to exclude directories, but you can achieve something similar by creating new project and disabling chosen LSP-clients at project level. It is doable via command palette => LSP: Disable language server in project.