blob: ad5b7a0006d36fcf17a3b36a35f59a303d6cc803 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
---@brief
---
--- https://github.com/PMunch/nimlsp
---
--- `nimlsp` can be installed via the `nimble` package manager:
---
--- ```sh
--- nimble install nimlsp
--- ```
local util = require 'lspconfig.util'
---@type vim.lsp.Config
return {
cmd = { 'nimlsp' },
filetypes = { 'nim' },
root_dir = function(bufnr, on_dir)
local fname = vim.api.nvim_buf_get_name(bufnr)
on_dir(
util.root_pattern '*.nimble'(fname) or vim.fs.dirname(vim.fs.find('.git', { path = fname, upward = true })[1])
)
end,
}
|