hyprland-community / hyprls

A LSP server for Hyprland config files [maintainer=@ewen-lbh]
https://ewen.works/hyprls
MIT License
128 stars 7 forks source link

invalid memory address or nil pointer dereference on an empty config file #3

Closed diegoroccia closed 7 months ago

diegoroccia commented 7 months ago

Thank you for the effort! I am getting error though:

Installed with go install github.com/ewen-lbh/hyprls/cmd/hyprls@latest

verified that it starts by running it from the console ❯ hyprls 2024-04-28T14:52:39.174+0200 DEBUG hyprls/main.go:25 going to start server 2024-04-28T14:52:39.175+0200 DEBUG hyprls@v0.1.0/main.go:18 starting server

created an empty hyprland.conf file and ran vim.lsp.start { name = "hyprlang", cmd = {"hyprls"}, root_dir = vim.fn.getcwd(), }

but as soon as I insert the first character, I get an error, Client hyprlang quit with exit code 2 and signal 0. Check log for errors

checking with LspLog gives

ewen-lbh commented 7 months ago

yeah I never tested it with an empty file :sweat_smile:

seems like some map somwhere is initialized too late? i'll look into it

ewen-lbh commented 7 months ago

You can upgrade to v0.1.1, it (should be) fixed