extra: nvim: use lspconfig.bashls instead of open-coding LSP start

Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
Christoph Heiss 2024-05-21 00:17:09 +02:00
parent 225e0e79a1
commit e666ed1161
Signed by: c8h4
GPG key ID: 73D5E7FDEE3DE49A
2 changed files with 3 additions and 10 deletions

View file

@ -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', {})

View file

@ -290,6 +290,8 @@ end
-- neovim/nvim-lspconfig
local lspconfig = require('lspconfig')
lspconfig.bashls.setup({})
lspconfig.typst_lsp.setup({
settings = {
exportPdf = 'onType',