Minor updates.

This commit is contained in:
Derek Taylor
2020-08-11 17:27:59 -05:00
parent c00618a23a
commit 367af05623
154 changed files with 2484 additions and 1801 deletions

View File

@@ -24,20 +24,27 @@ lua-language-server.")
(set-repl-handler! 'lua-mode #'+lua/open-repl)
(set-company-backend! 'lua-mode '(company-lua company-yasnippet))
(set-eglot-client!
'lua-mode
;; The absolute path to lua-language-server binary is necessary because the
;; bundled dependencies aren't found otherwise. The only reason this is a
;; function is to dynamically change when/if lua-lsp-dir variable changed
(list (doom-path lua-lsp-dir
(cond (IS-MAC "bin/macOS")
(IS-LINUX "bin/Linux")
(IS-WINDOWS "bin/Windows"))
"lua-language-server")
"-E" "-e" "LANG=en"
(doom-path lua-lsp-dir "main.lua")))
(when (featurep! +lsp)
(defun +lua-generate-lsp-server-command ()
;; The absolute path to lua-language-server binary is necessary because
;; the bundled dependencies aren't found otherwise. The only reason this
;; is a function is to dynamically change when/if `+lua-lsp-dir' does
(list (doom-path +lua-lsp-dir
(cond (IS-MAC "bin/macOS")
(IS-LINUX "bin/Linux")
(IS-WINDOWS "bin/Windows"))
"lua-language-server")
"-E" "-e" "LANG=en"
(doom-path +lua-lsp-dir "main.lua")))
(if (featurep! :tools lsp +eglot)
(set-eglot-client! 'lua-mode (+lua-generate-lsp-server-command))
(after! lsp-mode
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection '+lua-generate-lsp-server-command)
:major-modes '(lua-mode)
:priority -1
:server-id 'lua-langserver))))
(add-hook 'lua-mode-local-vars-hook #'lsp!)))

View File

@@ -1,13 +1,14 @@
;; -*- no-byte-compile: t; -*-
;;; lang/lua/packages.el
(package! lua-mode :pin "1f596a93b3")
(package! lua-mode :pin "35b6e4c20b8b4eaf783ccc8e613d0dd06dbd165c")
(when (featurep! +moonscript)
(package! moonscript :pin "56f90471e2")
(package! moonscript :pin "56f90471e2ced2b0a177aed4d8c2f854797e9cc7")
(when (featurep! :checkers syntax)
(package! flycheck-moonscript
:recipe (:host github :repo "hlissner/emacs-flycheck-moonscript") :pin "fcb99e5efc")))
:recipe (:host github :repo "hlissner/emacs-flycheck-moonscript")
:pin "fcb99e5efcf31db05f236f02eaa575986a57172d")))
(when (featurep! :completion company)
(package! company-lua :pin "29f6819de4"))
(package! company-lua :pin "29f6819de4d691e5fd0b62893a9f4fbc1c6fcb52"))