diff options
| -rw-r--r-- | nvim/ftplugin/markdown.lua | 3 | ||||
| -rw-r--r-- | nvim/lua/config/options.lua | 9 | ||||
| -rw-r--r-- | nvim/lua/config/usercmds.lua | 27 |
3 files changed, 36 insertions, 3 deletions
diff --git a/nvim/ftplugin/markdown.lua b/nvim/ftplugin/markdown.lua new file mode 100644 index 0000000..5f07330 --- /dev/null +++ b/nvim/ftplugin/markdown.lua | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | local opt = vim.opt_local | ||
| 2 | |||
| 3 | opt.wrap = true | ||
diff --git a/nvim/lua/config/options.lua b/nvim/lua/config/options.lua index 37adc84..848966b 100644 --- a/nvim/lua/config/options.lua +++ b/nvim/lua/config/options.lua | |||
| @@ -5,7 +5,6 @@ local g = vim.g | |||
| 5 | opt.number = true | 5 | opt.number = true |
| 6 | opt.cursorline = true | 6 | opt.cursorline = true |
| 7 | opt.shortmess:append("I") | 7 | opt.shortmess:append("I") |
| 8 | opt.wrap = false | ||
| 9 | opt.wildmenu = true | 8 | opt.wildmenu = true |
| 10 | opt.splitright = true | 9 | opt.splitright = true |
| 11 | opt.splitbelow = true | 10 | opt.splitbelow = true |
| @@ -13,6 +12,11 @@ opt.signcolumn = "yes" | |||
| 13 | opt.termguicolors = true | 12 | opt.termguicolors = true |
| 14 | opt.showcmd = false | 13 | opt.showcmd = false |
| 15 | 14 | ||
| 15 | -- Texte umbrechen | ||
| 16 | opt.wrap = false | ||
| 17 | opt.linebreak = true | ||
| 18 | opt.breakindent = true | ||
| 19 | |||
| 16 | -- Rechtschreibprüfung | 20 | -- Rechtschreibprüfung |
| 17 | opt.spelllang = { "de", "en" } | 21 | opt.spelllang = { "de", "en" } |
| 18 | opt.spell = false | 22 | opt.spell = false |
| @@ -35,6 +39,9 @@ opt.listchars = { | |||
| 35 | precedes = "<", | 39 | precedes = "<", |
| 36 | nbsp = "+" | 40 | nbsp = "+" |
| 37 | } | 41 | } |
| 42 | opt.showbreak = "↪ " | ||
| 43 | |||
| 44 | -- Erlaube % für Winkelklammern | ||
| 38 | opt.matchpairs:append("<:>") | 45 | opt.matchpairs:append("<:>") |
| 39 | 46 | ||
| 40 | -- automatisches Einlesen geänderter Dateien | 47 | -- automatisches Einlesen geänderter Dateien |
diff --git a/nvim/lua/config/usercmds.lua b/nvim/lua/config/usercmds.lua index e7dd220..490e4b5 100644 --- a/nvim/lua/config/usercmds.lua +++ b/nvim/lua/config/usercmds.lua | |||
| @@ -11,8 +11,31 @@ local function run_sonar() | |||
| 11 | return | 11 | return |
| 12 | end | 12 | end |
| 13 | 13 | ||
| 14 | -- vim.cmd("!" .. exe) | 14 | -- Suche nach *.properties im aktuellen Verzeichnis |
| 15 | vim.cmd("botright split | terminal " .. exe) | 15 | local files = vim.fn.glob("*.properties", false, true) |
| 16 | |||
| 17 | local cmd = exe | ||
| 18 | |||
| 19 | if #files > 0 then | ||
| 20 | -- Optional: gezielt sonar-project.properties bevorzugen | ||
| 21 | local selected = nil | ||
| 22 | for _, f in ipairs(files) do | ||
| 23 | if f == "sonar-project.properties" then | ||
| 24 | selected = f | ||
| 25 | break | ||
| 26 | end | ||
| 27 | end | ||
| 28 | |||
| 29 | -- Falls keine Standarddatei, nimm die erste | ||
| 30 | if not selected then selected = files[1] end | ||
| 31 | |||
| 32 | cmd = cmd .. " -Dproject.settings=" .. selected | ||
| 33 | vim.notify("Verwende Properties: " .. selected, vim.log.levels.INFO) | ||
| 34 | else | ||
| 35 | vim.notify("Keine .properties Datei gefunden, nutze Default-Verhalten", vim.log.levels.WARN) | ||
| 36 | end | ||
| 37 | |||
| 38 | vim.cmd("botright split | terminal " .. cmd) | ||
| 16 | vim.cmd("norm G") | 39 | vim.cmd("norm G") |
| 17 | end | 40 | end |
| 18 | 41 | ||
