Compare commits
No commits in common. "482e34699db49930d069d62ecea7a4deb325bada" and "3720e616744ba2f569051944980c893fb4a48ba9" have entirely different histories.
482e34699d
...
3720e61674
1 changed files with 3 additions and 19 deletions
|
@ -9,14 +9,6 @@ const lspServers = [
|
||||||
install: ['npm', 'install', '-g', 'dockerfile-language-server-nodejs'],
|
install: ['npm', 'install', '-g', 'dockerfile-language-server-nodejs'],
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
|
||||||
name: 'lua-language-server',
|
|
||||||
filetype: 'lua',
|
|
||||||
path: '/usr/local/bin/lua-language-server',
|
|
||||||
args: [],
|
|
||||||
install: ['brew', 'install', 'lua-language-server'],
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'tilt-lsp',
|
name: 'tilt-lsp',
|
||||||
filetype: 'bzl',
|
filetype: 'bzl',
|
||||||
|
@ -73,26 +65,18 @@ const lspOptions = {
|
||||||
aleSupport: true,
|
aleSupport: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
command! -nargs=0 -bar LspInstall Install()
|
|
||||||
|
|
||||||
export def LazyConfigure(): void
|
export def LazyConfigure(): void
|
||||||
autocmd VimEnter * ++once Configure()
|
autocmd VimEnter * ++once Configure()
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
export def Configure(): void
|
export def Configure(): void
|
||||||
final installedServers = lspServers->deepcopy()->filter((_, server) => executable(server.path) == 1)
|
g:LspAddServer(lspServers->deepcopy()->filter((_, server) => executable(server.path) == 1))
|
||||||
if len(lspServers) != len(installedServers)
|
|
||||||
echo (len(lspServers) - len(installedServers)) "language servers are configured, but not installed. You may want to run :LspInstall."
|
|
||||||
endif
|
|
||||||
g:LspAddServer(installedServers)
|
|
||||||
g:LspOptionsSet(lspOptions)
|
g:LspOptionsSet(lspOptions)
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
export def Install(): void
|
export def Install(): void
|
||||||
# TODO: running all installations in parallel doesn't work super well,
|
# TODO: work out a way nicer approach to automatically installing any
|
||||||
# because some package managers use an exclusive lock while they're running.
|
# missing language servers. Maybe use a command or something.
|
||||||
# Plus you don't get feedback on installation progress. Perhaps use
|
|
||||||
# term_start() instead, so installs run in series and are visible on screen?
|
|
||||||
const missing = lspServers->copy()
|
const missing = lspServers->copy()
|
||||||
->filter((_, server) => executable(server.path) == 0)
|
->filter((_, server) => executable(server.path) == 0)
|
||||||
const jobs = missing->copy()
|
const jobs = missing->copy()
|
||||||
|
|
Loading…
Reference in a new issue