extra: nvim: use lspconfig.bashls
instead of open-coding LSP start
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
parent
225e0e79a1
commit
e666ed1161
|
@ -78,6 +78,7 @@ vim.api.nvim_create_autocmd({ 'TermLeave' }, {
|
|||
end,
|
||||
})
|
||||
|
||||
-- Restore position in file on re-open
|
||||
vim.api.nvim_create_autocmd({ 'BufReadPost' }, {
|
||||
pattern = '*',
|
||||
callback = function()
|
||||
|
@ -88,16 +89,6 @@ vim.api.nvim_create_autocmd({ 'BufReadPost' }, {
|
|||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = { 'sh', 'zsh' },
|
||||
callback = function()
|
||||
vim.lsp.start({
|
||||
name = 'bash-language-server',
|
||||
cmd = { 'bash-language-server', 'start' },
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
-- Automatically switch between absolute and relative line numbers when
|
||||
-- entering insert mode
|
||||
local numbertoggle_group = vim.api.nvim_create_augroup('numbertoggle', {})
|
||||
|
|
|
@ -290,6 +290,8 @@ end
|
|||
-- neovim/nvim-lspconfig
|
||||
local lspconfig = require('lspconfig')
|
||||
|
||||
lspconfig.bashls.setup({})
|
||||
|
||||
lspconfig.typst_lsp.setup({
|
||||
settings = {
|
||||
exportPdf = 'onType',
|
||||
|
|
Loading…
Reference in a new issue