aboutsummaryrefslogtreecommitdiff
path: root/nvim/lua/config
diff options
context:
space:
mode:
authorThomas Schmucker <ts@its1.de>2026-03-25 07:08:57 +0100
committerThomas Schmucker <ts@its1.de>2026-03-25 07:08:57 +0100
commite99756d1d5acb6805003b403985ee0a2a253bf26 (patch)
tree7dac1f53da9f2f231d4457dd56589b3a514e841d /nvim/lua/config
parent9f6461c5b1cb6754b130b30dfe9ba50fd1fcf9cb (diff)
downloaddotfiles-e99756d1d5acb6805003b403985ee0a2a253bf26.tar.gz
dotfiles-e99756d1d5acb6805003b403985ee0a2a253bf26.tar.bz2
dotfiles-e99756d1d5acb6805003b403985ee0a2a253bf26.zip
Neovim: Sonarqube Unterstützung hinzugefügt
Diffstat (limited to 'nvim/lua/config')
-rw-r--r--nvim/lua/config/treesitter.lua1
-rw-r--r--nvim/lua/config/usercmds.lua31
2 files changed, 32 insertions, 0 deletions
diff --git a/nvim/lua/config/treesitter.lua b/nvim/lua/config/treesitter.lua
index 2bdfce5..f3024f0 100644
--- a/nvim/lua/config/treesitter.lua
+++ b/nvim/lua/config/treesitter.lua
@@ -12,6 +12,7 @@ M.languages = {
12 "make", 12 "make",
13 "markdown", 13 "markdown",
14 "markdown_inline", 14 "markdown_inline",
15 "po",
15 "prisma", 16 "prisma",
16 "python", 17 "python",
17 "typescript", 18 "typescript",
diff --git a/nvim/lua/config/usercmds.lua b/nvim/lua/config/usercmds.lua
new file mode 100644
index 0000000..e7dd220
--- /dev/null
+++ b/nvim/lua/config/usercmds.lua
@@ -0,0 +1,31 @@
1local function run_sonar()
2 local exe = vim.fn.exepath("sonar-scanner")
3
4 if exe == "" then
5 vim.notify("sonar-scanner nicht im PATH gefunden", vim.log.levels.ERROR)
6 return
7 end
8
9 if vim.fn.executable(exe) == 0 then
10 vim.notify("sonar-scanner ist nicht ausführbar", vim.log.levels.ERROR)
11 return
12 end
13
14 -- vim.cmd("!" .. exe)
15 vim.cmd("botright split | terminal " .. exe)
16 vim.cmd("norm G")
17end
18
19local function load_sonar_issues()
20 local cmd = vim.fn.stdpath("config") .. "/scripts/sonarqube.sh"
21
22 vim.fn.setqflist({}, " ", {
23 title = "SonarQube Issues",
24 lines = vim.fn.systemlist(cmd),
25 })
26
27 vim.cmd("copen")
28end
29
30vim.api.nvim_create_user_command("SonarScan", run_sonar, {})
31vim.api.nvim_create_user_command("SonarIssues", load_sonar_issues, {})