We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
lspconfig.util
1 parent 7ba101d commit ee49fe5Copy full SHA for ee49fe5
1 file changed
lsp/arduino_language_server.lua
@@ -68,13 +68,12 @@
68
--- Note that an upstream bug makes keywords in some cases become undefined by the language server.
69
--- Ref: https://github.com/arduino/arduino-ide/issues/159
70
71
-local util = require 'lspconfig.util'
72
-
73
return {
74
filetypes = { 'arduino' },
75
root_dir = function(bufnr, on_dir)
76
- local fname = vim.api.nvim_buf_get_name(bufnr)
77
- on_dir(util.root_pattern('*.ino')(fname))
+ on_dir(vim.fs.root(bufnr, function(name, _)
+ return vim.glob.to_lpeg('*.ino'):match(name) ~= nil
+ end))
78
end,
79
cmd = {
80
'arduino-language-server',
0 commit comments