We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
lspconfig.util
1 parent a1b447c commit a6403a6Copy full SHA for a6403a6
lsp/pasls.lua
@@ -15,13 +15,18 @@
15
--- export FPCTARGETCPU='x86_64' # Target CPU for cross compiling.
16
--- ```
17
18
-local util = require 'lspconfig.util'
19
-
20
return {
21
cmd = { 'pasls' },
22
filetypes = { 'pascal' },
23
root_dir = function(bufnr, on_dir)
24
- local fname = vim.api.nvim_buf_get_name(bufnr)
25
- on_dir(util.root_pattern('*.lpi', '*.lpk', '.git')(fname))
+ on_dir(vim.fs.root(bufnr, function(name, _)
+ local patterns = { '*.lpi', '*.lpk', '.git' }
+ for _, pattern in ipairs(patterns) do
+ if vim.glob.to_lpeg(pattern):match(name) ~= nil then
26
+ return true
27
+ end
28
29
+ return false
30
+ end))
31
end,
32
}
0 commit comments