Skip to content

Commit

Permalink
fix: Correct package prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Feb 6, 2024
1 parent 856daac commit c8daf17
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Consider adding this to your configuration.
(require 'eglot-ltex)
(eglot-ensure)))
:init
(setq eglot-languagetool-server-path "path/to/ltex-ls-XX.X.X/"))
(setq eglot-ltex-server-path "path/to/ltex-ls-XX.X.X/"))
```

## 🔧 Configuration
Expand Down
18 changes: 9 additions & 9 deletions eglot-ltex.el
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ https://github.com/valentjn/ltex-ls"
:group 'eglot
:link '(url-link :tag "Github" "https://github.com/emacs-languagetool/eglot-ltex"))

(defcustom eglot-languagetool-active-modes
(defcustom eglot-ltex-active-modes
;; Language ids can be found here:
;; https://github.com/valentjn/ltex-ls/blob/7c031d792110a824951aa003acd3ada158a515b4/src/main/kotlin/org/bsplines/ltexls/parsing/CodeFragmentizer.kt#L46
'((org-mode :language-id "org")
Expand All @@ -61,27 +61,27 @@ https://github.com/valentjn/ltex-ls"
(text-mode :language-id "plaintext"))
"List of major mode that work with LanguageTool."
:type 'list
:group 'eglot-grammarly)
:group 'eglot-ltex)

(defcustom eglot-languagetool-server-path ""
(defcustom eglot-ltex-server-path ""
"The root path of the LTEX language server's folder."
:type 'string
:group 'eglot)
:group 'eglot-ltex)

(defun eglot-ltex--server-entry ()
"Return the server entry file.
This file is use to activate the language server."
(f-join eglot-languagetool-server-path "bin" (if (eq system-type 'windows-nt)
"ltex-ls.bat"
"ltex-ls")))
(f-join eglot-ltex-server-path "bin" (if (eq system-type 'windows-nt)
"ltex-ls.bat"
"ltex-ls")))

(defun eglot-languagetool--server-command ()
(defun eglot-ltex--server-command ()
"Generate startup command for LTEX language server."
(list (eglot-ltex--server-entry)))

(add-to-list 'eglot-server-programs
`(,eglot-languagetool-active-modes . ,(eglot-languagetool--server-command)))
`(,eglot-ltex-active-modes . ,(eglot-ltex--server-command)))

(provide 'eglot-ltex)
;;; eglot-ltex.el ends here

0 comments on commit c8daf17

Please sign in to comment.