-
Notifications
You must be signed in to change notification settings - Fork 21
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
Language Server Protocol Experiments #81
base: master
Are you sure you want to change the base?
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.
Added some general comments about things I need to change
@@ -1 +1 @@ | |||
sbt.version = 0.13.18 | |||
sbt.version = 1.4.0 |
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.
Any idea what this changes? I was having issues getting my tooling to work due to mixed versions of Scala, so I upgraded SBT.
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.
I guess a newer SBT shouldn't hurt, as long as it works.
@KarolS, what is your opinion on adding a config file for common arguments (a |
Common tooling configs are fine and welcome, there's a Notepad++ syntax file in the repo already. So if I understand correctly, the file specifies a configuration for the server that is good enough for most potential users? If so, then sure, add it. |
There's two separate conversations about config files here. The first is about editor specific ( On a different topic, have you had a chance to look into how we can add the length of an expression to the AST? I imagine it's relatively easy to do, but in reading through |
As for the length of the expression, I guess it would be enough to record the position at both the beginning and end of a node. I think it should be doable. I might implement it partially though, for example just for expressions. I'll see how it goes. |
I naively tried collecting the |
@KarolS If you get a chance, I would really appreciate you taking a look at what I have so far. |
I'll take the look over the weekend. Thanks! |
I did some quick tests and apart from the sbt version thing and the docComment extension method, nothing else broke. However I would like to avoid using stderr for the diagnostic messages (I guess it can be done conditionally, depending on the LSP mode) and implementing multiline comments (C# uses ///, I think we can steal it). I left some comments in the relevant spots in the code. I haven't tested the LSP itself yet, I'll do it tomorrow. |
I wasn't particularly a fan of doing it that way, but I wasn't sure how else to handle it. We could bind user interaction to stdout and the LSP to stderr, but that doesn't fit as well into the *nix style.
Do you include the docstrings with the multiline comments? I don't care as much about the standard multiline style. I only added it because I added the docstrings.
Do you mean Github review comments? I don't see them at all. |
I cleaned up the writing to stdout/err and a few other things. I'm still not sure what you want in terms of the doc comments and multiline comments. I also cleaned up the VSCode extension; it should be easier to set up and run (no code changes required). |
…nto lsp-experiments
It's been a long time, but I finally got back to looking at this. I have a working identifier position recording branch available as a PR against this one agg23#1. It's messier than I would like, given the way |
Wanted to ping again @KarolS and see where you stand on this PR. Any input would be appreciated. |
Sorry for keeping you waiting, I was a bit busy in last few months, and when I got back to Millfork recently, I focused more on bugfixes and small usability improvements. |
I greatly appreciate you sharing Millfork with the world, and I don't mean to be rude @KarolS, but do you realistically think there will ever be progress on adding LSP support to Millfork? I've spent a not insignificant amount of time on this set of changes, and after nearly two years I haven't really received any feedback. I fully understand being busy and/or not wanting to dedicate time to the project at the moment (I can see you haven't been very publicly active on Github recently). However, it would be nice to have some indication of your desires. |
I'm really sorry for lack of communication. |
I appreciate the response, and I really sympathize with your stress. Don't stress extra about the PR or Millfork; they'll be here when you're ready. |
A very rough draft of implementing the Language Server Protocol as mentioned in #80.
You can use this by pulling https://github.com/agg23/millfork-lsp-vscode and switching the jar to point to this version of Millfork.
Functionality
import
statements and cross-file definitionsNode
under the cursor relies on the last column index before the cursor positionTODO
-lsp
)length
measurement inNode
include
directoriesimport
statements (used for go to definition)