aboutsummaryrefslogtreecommitdiffstats
path: root/lsp/foam_ls.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2025-04-23 14:58:31 +0200
committerJustin M. Keyes <justinkz@gmail.com>2025-04-23 15:08:14 +0200
commit79c12bc6e789dc3774a55289cc8fdedbd3b8ca38 (patch)
tree665054da7a577eaa53f155997e8cd84b7366de71 /lsp/foam_ls.lua
parentrefactor: deprecate util functions (diff)
downloadnvim-lspconfig-79c12bc6e789dc3774a55289cc8fdedbd3b8ca38.tar
nvim-lspconfig-79c12bc6e789dc3774a55289cc8fdedbd3b8ca38.tar.gz
nvim-lspconfig-79c12bc6e789dc3774a55289cc8fdedbd3b8ca38.tar.bz2
nvim-lspconfig-79c12bc6e789dc3774a55289cc8fdedbd3b8ca38.tar.lz
nvim-lspconfig-79c12bc6e789dc3774a55289cc8fdedbd3b8ca38.tar.xz
nvim-lspconfig-79c12bc6e789dc3774a55289cc8fdedbd3b8ca38.tar.zst
nvim-lspconfig-79c12bc6e789dc3774a55289cc8fdedbd3b8ca38.zip
refactor: deprecate util.path.search_ancestors()
Diffstat (limited to 'lsp/foam_ls.lua')
-rw-r--r--lsp/foam_ls.lua4
1 files changed, 1 insertions, 3 deletions
diff --git a/lsp/foam_ls.lua b/lsp/foam_ls.lua
index c7a47f3c..bbc9d728 100644
--- a/lsp/foam_ls.lua
+++ b/lsp/foam_ls.lua
@@ -7,14 +7,12 @@
--- npm install -g foam-language-server
--- ```
-local util = require 'lspconfig.util'
-
return {
cmd = { 'foam-ls', '--stdio' },
filetypes = { 'foam', 'OpenFOAM' },
root_dir = function(bufnr, on_dir)
local fname = vim.api.nvim_buf_get_name(bufnr)
- on_dir(util.search_ancestors(fname, function(path)
+ on_dir(vim.iter(vim.fs.parents(fname)):find(function(path)
if vim.uv.fs_stat(path .. '/system/controlDict') then
return path
end