Skip to content

Commit ee49fe5

Browse files
committed
feat(arduino_language_server): do not use lspconfig.util
1 parent 7ba101d commit ee49fe5

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

lsp/arduino_language_server.lua

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,12 @@
6868
--- Note that an upstream bug makes keywords in some cases become undefined by the language server.
6969
--- Ref: https://github.com/arduino/arduino-ide/issues/159
7070

71-
local util = require 'lspconfig.util'
72-
7371
return {
7472
filetypes = { 'arduino' },
7573
root_dir = function(bufnr, on_dir)
76-
local fname = vim.api.nvim_buf_get_name(bufnr)
77-
on_dir(util.root_pattern('*.ino')(fname))
74+
on_dir(vim.fs.root(bufnr, function(name, _)
75+
return vim.glob.to_lpeg('*.ino'):match(name) ~= nil
76+
end))
7877
end,
7978
cmd = {
8079
'arduino-language-server',

0 commit comments

Comments
 (0)