Support for the Kate Editor

Would be neat if PIO added support to the Kate Editor (by KDE). I started to use Kate on other projects as it is light weight and seems to be more polished in certain areas over VSCode. It has support for LSP, and user defined LSP configs which makes it easy to add languages. I am not sure if that’s how PIO works, but if it is having the LSP config would be a great start in adding support.

Kate seems quite extensible from what I seen, but haven’t had much time to play around with getting PIO to work with it. I will probably look into this myself when I get back to working on my hobby projects. Thought I’d post this as interest in moving to it and getting support.

This would be better tracked in https://github.com/platformio/platformio-core/issues instead of the community forums.

Did you check whether the project file generator for vim, which produces a .ccls file, can be used in Kate, too? See docs and template.

Actually, this issue already eixsts?

Oh, interesting. Thank you for providing some details. Kdevelop isn’t kate, but I am willing to use that for platformio things. I’ll also look into the ccls stuff.

I will make a pull request later, but you can basically do the following to support kate.

pio init --ide vim
cat >Makefile <<EOF
# Uncomment lines below if you have problems with $PATH
# SHELL := /bin/bash
# PATH := /usr/local/bin:$(PATH)

all:
	pio -f -c vim run

upload:
	pio -f -c vim run --target upload

clean:
	pio -f -c vim run --target clean

program:
	pio -f -c vim run --target program

uploadfs:
	pio -f -c vim run --target uploadfs

update:
	pio -f -c vim update
EOF
cat >.kateproject <<EOF
{
    "files": [
        {
            "recursive": 1,
            "hidden": 1
        }   
    ],
    "lspclient": {
        "servers": {
            "c": {
                "command": ["ccls", "-v", "0"],
                "commandDebug": ["ccls", "-v", "2"],
                "url": "https://github.com/MaskRay/ccls",
                "highlightingModeRegex": "^(C|ANSI C89|Objective-C)$"
            },  
            "cpp": {
                "use": "c",
                "highlightingModeRegex": "^(C\\+\\+|ISO C\\+\\+|Objective-C\\+\\+)$"
            }
        }
    },
    "build": {
        "build": "make all",
        "clean": "make clean",
        "install": "make upload",
        "targets": [
            {
                "name": "build",
                "build_cmd": "make all"
            },
            {
                "name": "clean",
                "build_cmd": "make clean"
            },
            {
                "name": "upload",
                "build_cmd": "make upload"
            },
            {
                "name": "uploadfs",
                "build_cmd": "make uploadfs"
            },
            {
                "name": "proogram",
                "build_cmd": "make program"
            }
        ]
    }
}
EOF
1 Like