From 79c12bc6e789dc3774a55289cc8fdedbd3b8ca38 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Wed, 23 Apr 2025 14:58:31 +0200 Subject: refactor: deprecate util.path.search_ancestors() --- lsp/foam_ls.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lsp/foam_ls.lua') 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 -- cgit v1.2.3-70-g09d2