diff options
| author | sharpchen <77432836+sharpchen@users.noreply.github.com> | 2025-01-05 13:42:33 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-05 05:42:33 -0800 |
| commit | 5e009bded3098fb0f46c7e3c30a3f2884aae55e1 (patch) | |
| tree | 0da62378429eb47f9b260556ed43a65066891759 /lua | |
| parent | docs: update configs.md (diff) | |
| download | nvim-lspconfig-5e009bded3098fb0f46c7e3c30a3f2884aae55e1.tar nvim-lspconfig-5e009bded3098fb0f46c7e3c30a3f2884aae55e1.tar.gz nvim-lspconfig-5e009bded3098fb0f46c7e3c30a3f2884aae55e1.tar.bz2 nvim-lspconfig-5e009bded3098fb0f46c7e3c30a3f2884aae55e1.tar.lz nvim-lspconfig-5e009bded3098fb0f46c7e3c30a3f2884aae55e1.tar.xz nvim-lspconfig-5e009bded3098fb0f46c7e3c30a3f2884aae55e1.tar.zst nvim-lspconfig-5e009bded3098fb0f46c7e3c30a3f2884aae55e1.zip | |
fix(msbuild): root patterns #3542
https://github.com/tintoy/msbuild-project-tools-vscode?tab=readme-ov-file#file-extensions
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/configs/msbuild_project_tools_server.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lua/lspconfig/configs/msbuild_project_tools_server.lua b/lua/lspconfig/configs/msbuild_project_tools_server.lua index 4c4cbf79..54d14fc2 100644 --- a/lua/lspconfig/configs/msbuild_project_tools_server.lua +++ b/lua/lspconfig/configs/msbuild_project_tools_server.lua @@ -1,11 +1,10 @@ local host_dll_name = 'MSBuildProjectTools.LanguageServer.Host.dll' +local util = require 'lspconfig.util' return { default_config = { filetypes = { 'msbuild' }, - root_dir = function(fname) - return vim.fs.dirname(vim.fs.find('.git', { path = fname, upward = true })[1]) - end, + root_dir = util.root_pattern('*.sln', '*.slnx', '*.*proj', '.git'), init_options = {}, cmd = { 'dotnet', host_dll_name }, }, |
