[Feature Request]: Add support for filetype endings with LSP
First of all, I'm sorry if this is not the right place. That big red warning up there is quite scary.
The main thing I want to accomplish is being able to start a language server while the highlighting mode/document mode is not in Kate. This is, as to my little knowledge of browsing issues and merge requests for a couple hours, not currently possible.
Concretely, I want to use the language server of the scripting language Elvish. It has a built-in LSP that can be started with elvish -lsp
I tried adding the following configuration to my user server settings. But this didn't seem to work. Opening a .elv file gives "No LSP server for this document"
{
"servers": {
"elvish": {
"command": ["elvish", "-lsp"],
"url": "https://github.com/elves/elvish",
"highlightingModeRegex": "^Elvish$"
}
}
}
I believe this is because there is no highlighting mode or document mode for Elvish, so it defaults to Normal mode and the server never even gets started. So, I've got a few possible suggestions as to how this can maybe be resolved.
- Allow for a
fileType: string
property in the server configuration, so that any file that matches this filetype starts the server, though maybe being in a different hightlighting mode starts both servers and might break what suggestions to give... Perhaps the filetype should take precedence over the mode. I'll leave that decision up to the devs/maintainers - Provide better documentation as to how people can implement new language modes into Kate, or allow these implementations as plugins. I have no issue implementing such a feature myself, but I would rather not go through hundreds of files just to understand how everything works before even starting