nvim: after/ftplugin/sh: Add language server for bash
This commit is contained in:
parent
66cd6aee69
commit
a328fe3c5d
2 changed files with 14 additions and 1 deletions
14
nvim/.config/nvim/after/ftplugin/sh.lua
Normal file
14
nvim/.config/nvim/after/ftplugin/sh.lua
Normal file
|
@ -0,0 +1,14 @@
|
|||
vim.lsp.start({
|
||||
name = "bashls",
|
||||
cmd = { 'bash-language-server', 'start' },
|
||||
root_dir = vim.fn.getcwd(),
|
||||
filetypes = { 'sh' },
|
||||
single_file_support = true,
|
||||
cmd_env = {
|
||||
-- Prevent recursive scanning which will cause issues when opening a file
|
||||
-- directly in the home directory (e.g. ~/foo.sh).
|
||||
--
|
||||
-- Default upstream pattern is "**/*@(.sh|.inc|.bash|.command)".
|
||||
GLOB_PATTERN = vim.env.GLOB_PATTERN or '*@(.sh|.inc|.bash|.command)',
|
||||
},
|
||||
})
|
|
@ -1 +0,0 @@
|
|||
autocmd! BufWritePost <buffer> lua require('lint').try_lint()
|
Loading…
Reference in a new issue