Using Kate with arduino-language-server (LSP)

Hello,
I’d like to use Kate with arduino-language-server, but each time I open an arduino sketch (.ino file), it is always recognized as ISO C++ and the default clang language server is started. How can I configure Kate to associate *.ino file with arduino-language-server ?

Try KDE System Settings → Applications and windows → Default applications → File associations. There you can define which application to use for .ino file type.

I’m sharing the solution that seems to have worked when we had the matrix discussion

First, you will have to create new filetype specifically for Arduino

You can use same values as the screenshot has.

Then to enable the arduino language server, add this to the language server plugin settings

        "arduino": {
            "command": ["arduino-language-server"],
            "highlightingModeRegex": "^Arduino$"
        }

Though I have no idea what the actual command is, so that might be wrong. The "highlightingModeRegex": "^Arduino$" is the important bit.

Can you share your config for it and mark this as solved?

1 Like

The exact command will depend on the environment.
You can find details on the arduino-language-server github.
Thanks

1 Like