mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-11-28 18:28:35 -05:00
emacs/neovim: add lua-language-server
This commit is contained in:
parent
9e16310d4e
commit
40c9496e1f
@ -109,6 +109,8 @@
|
|||||||
"--header-insertion=iwyu"
|
"--header-insertion=iwyu"
|
||||||
"--header-insertion-decorators"))
|
"--header-insertion-decorators"))
|
||||||
;;(after! lsp-clangd (set-lsp-priority! 'clangd 2)) ;; Prefer clangd instead of default ccls
|
;;(after! lsp-clangd (set-lsp-priority! 'clangd 2)) ;; Prefer clangd instead of default ccls
|
||||||
|
(setq lua-lsp-dir "~/.config/emacs/.local/etc/lsp/lua-language-server/"
|
||||||
|
lua-lsp-completion-call-snippet "Replace")
|
||||||
|
|
||||||
;; Quicker which-key
|
;; Quicker which-key
|
||||||
(after! which-key
|
(after! which-key
|
||||||
|
@ -159,7 +159,7 @@
|
|||||||
;;lean
|
;;lean
|
||||||
;;factor
|
;;factor
|
||||||
;;ledger ; an accounting system in Emacs
|
;;ledger ; an accounting system in Emacs
|
||||||
lua ; one-based indices? one-based indices
|
(lua +lsp) ; one-based indices? one-based indices
|
||||||
(markdown ; writing docs for people to ignore
|
(markdown ; writing docs for people to ignore
|
||||||
+grip)
|
+grip)
|
||||||
;;nim ; python + lisp at the speed of c
|
;;nim ; python + lisp at the speed of c
|
||||||
|
@ -76,7 +76,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"coc-actions.useCursorLine": true,
|
"coc-actions.useCursorLine": true,
|
||||||
"python.venvPath": "~/.local/share/pyenv/versions",
|
"python.venvPath": "/home/follie/.local/share/pyenv/versions",
|
||||||
"python.pythonPath": "python3",
|
"python.pythonPath": "python3",
|
||||||
"python.linting.enabled": true,
|
"python.linting.enabled": true,
|
||||||
"python.linting.banditEnabled": true,
|
"python.linting.banditEnabled": true,
|
||||||
@ -91,6 +91,34 @@
|
|||||||
],
|
],
|
||||||
"clangd.semanticHighlighting": true,
|
"clangd.semanticHighlighting": true,
|
||||||
"languageserver": {
|
"languageserver": {
|
||||||
|
"lua-language-server": {
|
||||||
|
"command": "/home/follie/.local/share/nvim/lsp/lua-language-server/bin/Linux/lua-language-server",
|
||||||
|
"args": [
|
||||||
|
"-E",
|
||||||
|
"/home/follie/.local/share/nvim/lsp/lua-language-server/main.lua"
|
||||||
|
],
|
||||||
|
"filetypes": [
|
||||||
|
"lua"
|
||||||
|
],
|
||||||
|
"rootPatterns": [
|
||||||
|
".git/",
|
||||||
|
".hg/",
|
||||||
|
".projectile"
|
||||||
|
],
|
||||||
|
"settings": {
|
||||||
|
"Lua": {
|
||||||
|
"completion": {
|
||||||
|
"callSnippet": "Replace"
|
||||||
|
},
|
||||||
|
"hint": {
|
||||||
|
"enable": true
|
||||||
|
},
|
||||||
|
"telemetry": {
|
||||||
|
"enable": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"ccls": {
|
"ccls": {
|
||||||
"command": "ccls",
|
"command": "ccls",
|
||||||
"filetypes": [
|
"filetypes": [
|
||||||
@ -105,7 +133,8 @@
|
|||||||
".ccls",
|
".ccls",
|
||||||
"compile_commands.json",
|
"compile_commands.json",
|
||||||
".git/",
|
".git/",
|
||||||
".hg/"
|
".hg/",
|
||||||
|
".projectile"
|
||||||
],
|
],
|
||||||
"initializationOptions": {
|
"initializationOptions": {
|
||||||
"cache": {
|
"cache": {
|
||||||
|
24
setup/lua-language-server.sh
Executable file
24
setup/lua-language-server.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# clone the repo
|
||||||
|
git clone https://github.com/sumneko/lua-language-server
|
||||||
|
cd lua-language-server || exit
|
||||||
|
git submodule update --init --recursive
|
||||||
|
|
||||||
|
# build
|
||||||
|
# You need `ninja`
|
||||||
|
cd 3rd/luamake || exit
|
||||||
|
ninja -f ninja/linux.ninja
|
||||||
|
cd ../..
|
||||||
|
./3rd/luamake/luamake rebuild
|
||||||
|
|
||||||
|
# Just for the convenience sake
|
||||||
|
cd ../
|
||||||
|
mv -rfv lua-language-server ~/Code/lua-language-server
|
||||||
|
|
||||||
|
# For coc.nvim
|
||||||
|
mkdir -pv ~/.local/share/nvim/lsp
|
||||||
|
ln -sv ~/Code/lua-language-server ~/.local/share/nvim/lsp/
|
||||||
|
# For Doom Emacs
|
||||||
|
mkdir -pv ~/.config/emacs/.local/etc/lsp
|
||||||
|
ln -sv ~/Code/lua-language-server ~/.config/emacs/.local/etc/lsp/
|
Loading…
Reference in New Issue
Block a user