Highly experimental partially functional LSP implementation for the yuck configuration language. See https://www.github.com/elkowar/eww.
Install dotnet-sdk-8.0 on your computer from your package manager.
git clone https://www.github.com/eugenenoble2005/yuckls.git
cd yuckls/YuckLS
dotnet build --output dist
Note where you cloned the repo to and where the compiled binaries are (/dist). You can now set it up for an editor
You can install the master branch from the aur.
yay -S yuckls-git
The executable can be started by running yuckls
-- put this in your init.lua
vim.api.nvim_create_autocmd(
{"BufEnter", "BufWinEnter"},
{
pattern = {"*.yuck"},
callback = function(event)
print(string.format("starting yuck;s for %s", vim.inspect(event)))
vim.lsp.start {
name = "YuckLs",
cmd = {"dotnet", "/home/gitrepos/yuckls/YuckLS/dist/YuckLS.dll"}, --this must be where you cloned this repo to.
--cmd = {"yuckls"} -- if installed from aur
root_dir = vim.fn.getcwd()
}
end
}
)
# put this in your languages.toml
[language-server]
yuckls = {command="dotnet" , args = ["/home/gitrepos/yuckls/YuckLS/dist/YuckLS.dll"]} #must be where you cloned this repo to
#yuckls = {command = "yuckls } #if installed from aur
[[language]]
name="yuck"
scope="source.yuck"
injection-regex="yuck"
file-types=["yuck"]
language-servers = ["yuckls"]
✔️ Basic in built type completions for widgets and properties
✔️ Basic Completions for custom widgets
✔️ Basic Diagnostics and error reporting
❌ Go to definition for custom widgets and variables
❌ Buffer formatting
For some reason i already regret, i decided to write the parser with just regex and string parsing instead of more standard methods like using lexers or ASTs. It's quirky but should work fine for many simple cases. Perhaps in the future or until a better solution is available, i might rewrite the whole thing to use ANTLR or something more flexible and concise.