Open wingyplus opened 1 year ago
For your information, if you use https://github.com/glehmann/earthlyls, it provides several LSP features, including so called semantic tokens, meaning that you can ask the lsp server to provide the highlighting feature (using lsp-semantic-tokens-mode
).
At first, I planned to create pull requests in here to improve the highlighting feature, but on second though, a semantically backed highlighting provided by LSP looks more awesome to me.
Hi @Konubinix, the PR for the improvement is very welcome. :)
I'm not sure there is anything to do in earthly-emacs to deal with this.
My setup looks like this
(use-package lsp-mode :commands (lsp))
(defun konix/earthfile-mode-hook ()
(setq indent-tabs-mode nil)
(setq tab-width 4)
(setq indent-line-function #'tab-to-tab-stop)
(setq-local lsp-semantic-tokens-enable t)
(lsp)
)
(add-hook #'earthfile-mode-hook
#'konix/earthfile-mode-hook)
Consider example below:
The
AS
keyword doesn't get highlight as a keyword.