-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for purescript language server #2572
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add tests for the code here. See :help ale-dev
and look at tests for other linters.
@@ -338,6 +338,8 @@ Notes: | |||
* `languageserver` | |||
* `puppet` | |||
* `puppet-lint` | |||
* Purescript | |||
* `purels` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name this and the heading purescript-language-server
. Update the table of contents in ale.txt
for the options for linters. Update the Markdown list of supported tools.
ale_linters/purescript/purels.vim
Outdated
\ 'command': function('ale_linters#purescript#purels#GetCommand'), | ||
\ 'project_root': function('ale_linters#purescript#purels#FindProjectRoot'), | ||
\ 'lsp_config': {b -> ale#Var(b, 'purescript_purels_config')}, | ||
\ 'language': 'purescript', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove the language
key, it's redundant.
ale_linters/purescript/purels.vim
Outdated
|
||
call ale#Set('purescript_purels_executable', 'purescript-language-server') | ||
call ale#Set('purescript_purels_use_global', get(g:, 'ale_use_global_executables', 0)) | ||
call ale#Set('purescript_purels_config', {}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name the file and the variables ls
instead of purels
. That will more closely match how other files are named.
ale_linters/purescript/purels.vim
Outdated
endfunction | ||
|
||
call ale#linter#Define('purescript', { | ||
\ 'name': 'purels', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name the linter here purescript-language-server
.
Thanks for the feedback, I’ll work on updating the PR in the next few days. |
@w0rp I think I've address all of your naming concerns, but travis is failing with errors about my help files being incorrect. I don't know much about correctly formatting vim help files. They appear aligned to my eye, but perhaps I'm missing something. I'll look into adding tests tomorrow. |
@w0rp apologies, a force push negated your approval. I've added tests and gotten the build passing. I think this should be good to merge now. Thanks for the feedback and help. |
Please let me know if there's anything else to be done here. Thanks! |
Cheers! 🍻 |
Adds support for the purescript language server. Based off of this old, now stale PR.
This seems to work for me locally, though I'm a bit fuzzy on if this is the correct way to implement config for the language server protocol.
Thanks!