Add syntax highlighting and LSP support for Haskell#164
Add syntax highlighting and LSP support for Haskell#164a12l wants to merge 1 commit intosminez:developfrom
Conversation
|
This is two very different things here:
I'm happy with the first as a PR, but the second is likely not something I can help with much I'm afraid. That error looks like the LSP server is crashing or exiting early. If there are any hard errors then they should show up in the ad log (there's a key binding to open it). Can you remove the LSP parts of this PR and then raise an issue for the LSP problem if the ad log shows that ad is doing something wrong here please. From what I've heard previously about Haskell LSP setup, I suspect this might end up being something out of my control if there isn't an obvious error in the log |
6a308eb to
7391274
Compare
|
@sminez does the syntax highlighting commit look good to you? I'm planning to moving the commit for LSP support to another branch later. |
|
The syntax highlighting commit looks fine. I'm not sure about the LSP support one though, from what you said in #159 it sounded like the way you need to set up LSP for Haskell differs per project? If that's the case, I don't think |
|
Sorry, forgot to write a reply in that issue. It turned out that I was mistaken. Apparently you need to manually set an option for the script |
highlights.scm is copied direct from the nvim-treesitter repository with the latest commit that touched it being 188b1a6d01fd9bcf04bf2bc932d611809b154acc.
7391274 to
f5beaca
Compare
|
@a12l the queries you've got here aren't validating I'm afraid. I think it's just a case of stripping out some of the tags that neovim queries add for internal vim functionality. If you can fix up the queries and validate locally with I'm aiming to publish the |
8dff1e7 to
4e81f74
Compare
|
Just want to say that I haven't forgotten about this, just haven't had the time to complete it. |
This is both a pull request and a issue.
Pull Request
highlights.scm is copied direct from the nvim-treesitter repository with the latest commit that touched it being 188b1a6d01fd9bcf04bf2bc932d611809b154acc.
From what I understand you usually vendor the query file from tree sitter, but the user themselves need to install the parser? I guess the parser is platform dependent and you need to build it for each platform?
Issue
The reason I include the issue with the pull request is that I'm having an issue, and I want to make sure that it isn't related to my PR.
feature/add-haskell-lsp)Describe the bug
When I press
<space> l c(I've the line"<space> l c" = { run = "lsp-completion" }in my~/.ad/config.toml) while having selected a symbol I get an error message (see attached image). The error message saysTo Reproduce
I created my
haskell.soparser bygit clone https://github.com/tree-sitter-grammars/tree-sitter-haskell.gitcd tree-sitter-haskelltree-sitter buildcp haskell.so ~/.ad/tree-sitter/parsers/The
tree-sitterCLI is installed from FreeBSD's port collection.I hope I've configured everything correctly. I've created a new Haskell project by running
stack new fooand manually addinghie.yamlto the project root with the contentWhen I start ad with
ad ./app/Main.hsi get the messagesLSP server startedand a little while later `Setting up foo (for app/Main.hs):.Expected behavior
Some form of completion suggestions showing up.
Screenshots
Additional context