diff options
| -rw-r--r-- | neovim-windows-setup.md | 1 | ||||
| -rw-r--r-- | nvim/lua/config/usercmds.lua | 10 |
2 files changed, 8 insertions, 3 deletions
diff --git a/neovim-windows-setup.md b/neovim-windows-setup.md index 6791f3d..8227995 100644 --- a/neovim-windows-setup.md +++ b/neovim-windows-setup.md | |||
| @@ -66,7 +66,6 @@ $userPath = [Environment]::GetEnvironmentVariable("PATH", "User") | |||
| 66 | ## 4. Bekannte Stolpersteine | 66 | ## 4. Bekannte Stolpersteine |
| 67 | 67 | ||
| 68 | - **C-Compiler für `nvim-treesitter` (MSVC)**: `cl.exe` findet `nvim-treesitter` automatisch, aber nur wenn `INCLUDE`/`LIB` gesetzt sind – das passiert ausschließlich in einer "Developer PowerShell for VS" bzw. "x64 Native Tools Command Prompt", nicht in einer normalen PowerShell/Windows Terminal-Sitzung. Ohne das schlägt die Parser-Kompilierung mit einer Meldung wie "cannot find `<header>`.h" fehl, obwohl `cl.exe` selbst gefunden wird. Neovim also immer aus dieser Developer-Shell heraus starten. | 68 | - **C-Compiler für `nvim-treesitter` (MSVC)**: `cl.exe` findet `nvim-treesitter` automatisch, aber nur wenn `INCLUDE`/`LIB` gesetzt sind – das passiert ausschließlich in einer "Developer PowerShell for VS" bzw. "x64 Native Tools Command Prompt", nicht in einer normalen PowerShell/Windows Terminal-Sitzung. Ohne das schlägt die Parser-Kompilierung mit einer Meldung wie "cannot find `<header>`.h" fehl, obwohl `cl.exe` selbst gefunden wird. Neovim also immer aus dieser Developer-Shell heraus starten. |
| 69 | - **`scripts/sonarqube.sh`** (`:SonarIssues`): reines POSIX-Shellskript, kein Windows-Pendant vorhanden. Läuft nur, wenn ein `sh` im PATH liegt (z. B. `sh.exe` aus Git for Windows im PATH verfügbar machen); ansonsten `:SonarIssues` auf Windows nicht nutzen. | ||
| 70 | 69 | ||
| 71 | ## 5. Verifizieren | 70 | ## 5. Verifizieren |
| 72 | 71 | ||
diff --git a/nvim/lua/config/usercmds.lua b/nvim/lua/config/usercmds.lua index 9abc50f..db02497 100644 --- a/nvim/lua/config/usercmds.lua +++ b/nvim/lua/config/usercmds.lua | |||
| @@ -66,8 +66,14 @@ local function enable_lsp() | |||
| 66 | vim.cmd("edit") -- triggert Reattach bei vielen Setups | 66 | vim.cmd("edit") -- triggert Reattach bei vielen Setups |
| 67 | end | 67 | end |
| 68 | 68 | ||
| 69 | vim.api.nvim_create_user_command("SonarScan", run_sonar, {}) | 69 | -- sonar-scanner/scripts/sonarqube.sh sind POSIX-only (kein Windows-Pendant), |
| 70 | vim.api.nvim_create_user_command("SonarIssues", load_sonar_issues, {}) | 70 | -- deshalb Kommandos unter Windows gar nicht erst registrieren statt sie |
| 71 | -- dort fehlschlagen zu lassen. | ||
| 72 | if vim.fn.has("win32") == 0 then | ||
| 73 | vim.api.nvim_create_user_command("SonarScan", run_sonar, {}) | ||
| 74 | vim.api.nvim_create_user_command("SonarIssues", load_sonar_issues, {}) | ||
| 75 | end | ||
| 76 | |||
| 71 | vim.api.nvim_create_user_command("LspOff", disable_lsp, {}) | 77 | vim.api.nvim_create_user_command("LspOff", disable_lsp, {}) |
| 72 | vim.api.nvim_create_user_command("LspOffBuffer", disable_lsp_buffer, {}) | 78 | vim.api.nvim_create_user_command("LspOffBuffer", disable_lsp_buffer, {}) |
| 73 | vim.api.nvim_create_user_command("LspOn", enable_lsp, {}) | 79 | vim.api.nvim_create_user_command("LspOn", enable_lsp, {}) |
