earthly / earthly-emacs

Major mode for editing Earthly Earthfile
Mozilla Public License 2.0
18 stars 8 forks source link

Add roadmap #9

Open TheCoreMan opened 3 years ago

TheCoreMan commented 3 years ago

First of all Hi everyone, cool seeing my initial random extension in MELPA! Great work all around.

In my original https://github.com/TheCoreMan/earthly-spacemacs-layer#plan repo, I had a roadmap with some cool features we should add. I think we should add that here as well, either in "Projects", or a file, or issues...? @vladaionescu How do you want to manage the backlog here? Up to you mostly :)

wingyplus commented 3 years ago

I think we should experiment language server protocol. Since it land, we can make emacs support by configuring lsp-mode to recognize it and solve missing feature in the editor ecosystem such as this issue vscode (https://github.com/earthly/earthly/issues/507) or even vim.

TheCoreMan commented 3 years ago

Yeah, I'm planning to work on the LSP soon with @vladaionescu . We just need to find some time in our schedules. New startup here, not a lot of OSS time left ๐Ÿ˜…

wingyplus commented 3 years ago

@TheCoreMan iโ€™ve start explore the lsp on the previous week. The server can start and it connected to the lsp-mode but no any action implement yet. I can share the code to get this thing up. ๐Ÿ˜ƒ

btw, congrats with your new startup. ๐Ÿ˜Š

vladaionescu commented 3 years ago

There's someone I'm talking to offline who is also experimenting with LSP over the next couple of weeks. No concrete plan yet though.

It would be great if the roadmap was consolidated on this project. @TheCoreMan, I'll give you permissions on this repo to manage issues & projects, in case you wanted to populate that here.

wingyplus commented 3 years ago

I've done some research on the language server a couple wees ago here. In the research, I use the library called jrpc2, it is JSON Rpc library that can parse LSP protocol header. And use a protocol that is generated from x/tools repository. And try to integrate with emacs with this configuration:

(use-package earthfile-mode
  :init
  (setq lsp-server-trace "verbose")
  :config
  (add-to-list 'lsp-language-id-configuration '(earthly-mode . "earthly"))
  (lsp-register-client
   (make-lsp-client :new-connection (lsp-stdio-connection "path/to/earthlyls")
            :major-modes '(earthly-mode)
            :language-id "earthly"
            :server-id 'earthlyls
            :priority 0))
  (add-hook 'earthly-mode-hook #'lsp))
TheCoreMan commented 3 years ago

@vladaionescu waiting on the permission to create a project and then I'll populate the issues.

@wingyplus awesome work on the LS :) Exactly what I wanted to start doing. This is probably a good reference https://github.com/golang/tools/blob/master/internal/lsp/server.go

wingyplus commented 3 years ago

@wingyplus awesome work on the LS :) Exactly what I wanted to start doing. This is probably a good reference https://github.com/golang/tools/blob/master/internal/lsp/server.go

@TheCoreMan Yeah. That is the one I use and another one is terraform-ls, I use terraform-ls as a jsonrpc2 library reference. :)

vladaionescu commented 3 years ago

BTW @andrewsykim has also played around with LSP and came up with a basic implementation here: https://github.com/andrewsykim/earthly-lsp

vladaionescu commented 3 years ago

@TheCoreMan - the invite has already been sent. See https://github.com/earthly/earthly-emacs/invitations to accept.

Screen Shot 2021-09-10 at 10 10 36 AM
wingyplus commented 3 years ago

BTW @andrewsykim has also played around with LSP and came up with a basic implementation here: https://github.com/andrewsykim/earthly-lsp

Thatโ€™s really great!! I will find the time to integrating with the lsp.

wingyplus commented 2 years ago

@TheCoreMan @vladaionescu Do you still have a backlog in the roadmap?