aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/bashls.lua
blob: 5990f10491d02ac0e55a07e1a031f7c7558a5850 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
local configs = require "lspconfig/configs"
local util = require "lspconfig/util"

local server_name = "bashls"

configs[server_name] = {
  default_config = {
    cmd = { "bash-language-server", "start" },
    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)",
    },
    filetypes = { "sh" },
    root_dir = util.path.dirname,
  },
  docs = {
    description = [[
https://github.com/mads-hartmann/bash-language-server

Language server for bash, written using tree sitter in typescript.
]],
    default_config = {
      root_dir = "vim's starting directory",
    },
  },
}

-- vim:et ts=2 sw=2