diff options
| author | Thomas Schmucker <ts@its1.de> | 2026-08-03 08:08:06 +0200 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2026-08-03 08:08:06 +0200 |
| commit | 230e4e630e7e2d6f26f4b78d5121b01e1061ef7f (patch) | |
| tree | 6c9436cbec5350d713649274f79eedc4afe09152 | |
| parent | 34329ca2ff3b3263172114c8f34b5b824170cd9d (diff) | |
| download | dotfiles-230e4e630e7e2d6f26f4b78d5121b01e1061ef7f.tar.gz dotfiles-230e4e630e7e2d6f26f4b78d5121b01e1061ef7f.tar.bz2 dotfiles-230e4e630e7e2d6f26f4b78d5121b01e1061ef7f.zip | |
neovim: Funktion 'update_parsers' um Logs ergänzt
| -rw-r--r-- | nvim/lua/config/usercmds.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/nvim/lua/config/usercmds.lua b/nvim/lua/config/usercmds.lua index c9fc81d..189dde6 100644 --- a/nvim/lua/config/usercmds.lua +++ b/nvim/lua/config/usercmds.lua | |||
| @@ -68,6 +68,7 @@ end | |||
| 68 | 68 | ||
| 69 | local function update_parsers() | 69 | local function update_parsers() |
| 70 | local install = require("nvim-treesitter.install") | 70 | local install = require("nvim-treesitter.install") |
| 71 | local ts_config = require("nvim-treesitter.config") | ||
| 71 | local langs = require("config.treesitter").languages | 72 | local langs = require("config.treesitter").languages |
| 72 | 73 | ||
| 73 | -- install() installiert fehlende Parser, ueberspringt aber bereits | 74 | -- install() installiert fehlende Parser, ueberspringt aber bereits |
| @@ -79,6 +80,21 @@ local function update_parsers() | |||
| 79 | -- fertig sind. | 80 | -- fertig sind. |
| 80 | install.install(langs, { summary = true }):wait() | 81 | install.install(langs, { summary = true }):wait() |
| 81 | install.update(langs, { summary = true }):wait() | 82 | install.update(langs, { summary = true }):wait() |
| 83 | |||
| 84 | -- summary = true meldet sich ueber vim.notify/log.info, das laeuft ueber | ||
| 85 | -- Neovims Message-Area. Im headless-Modus (kein UI) landet das nirgends | ||
| 86 | -- sichtbar. io.write schreibt direkt auf den Prozess-stdout und liefert | ||
| 87 | -- damit auch bei "nvim-update" eine verlaessliche Bestaetigung. | ||
| 88 | local installed = ts_config.get_installed("parsers") | ||
| 89 | local missing = vim.tbl_filter(function(l) | ||
| 90 | return not vim.list_contains(installed, l) | ||
| 91 | end, langs) | ||
| 92 | |||
| 93 | if #missing > 0 then | ||
| 94 | io.write("[UpdateParsers] FEHLEND: " .. table.concat(missing, ", ") .. "\n") | ||
| 95 | else | ||
| 96 | io.write("[UpdateParsers] alle " .. #langs .. " Parser installiert/aktuell.\n") | ||
| 97 | end | ||
| 82 | end | 98 | end |
| 83 | 99 | ||
| 84 | -- sonar-scanner/scripts/sonarqube.sh sind POSIX-only (kein Windows-Pendant), | 100 | -- sonar-scanner/scripts/sonarqube.sh sind POSIX-only (kein Windows-Pendant), |
