plugins/lsp/servers: replace rootDir with rootMarkers

nvim-lspconfig historically used `root_dir`, along with util functions
like `root_pattern`.

Now that neovim's own LSP API is used, `root_dir` appears to be subtly
different and `root_markers` is introduced to replace `util.root_pattern`.

Since we cannot easily warn about the `root_dir` differences, it can
usually be replaced with `root_markers`, and can still be manually
configured via `extraOptions` if needed; the simplest approach here is
to remove the `rootDir` option.
This commit is contained in:
Matt Sturgeon 2025-04-25 16:00:16 +01:00
parent a21504f2b0
commit b72ba2e4e2
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
2 changed files with 23 additions and 9 deletions

View file

@ -84,12 +84,13 @@
filetypes = [ "python" ];
autostart = false;
};
# rootDir
# rootMarkers
tinymist = {
enable = true;
rootDir = ''
require 'lspconfig.util'.root_pattern('.git', 'main.typ')
'';
rootMarkers = [
".git"
"main.typ"
];
};
};
};