Compare commits

..

4 Commits

Author SHA1 Message Date
87ab333ec9 Added org mode insert <C-CR> to be meta_return 2025-10-23 08:46:39 +02:00
93e281cbb5 Register fzf-lua as ui_select on startup 2025-09-15 10:49:20 +02:00
4bd4d87f5b Dropped AI integration, inline diagnostics, orgmode completion
Keymaps:

- key binding for viewing git log of current file: <space>=l
- blink keybindings simplified, added orgmode as source

Plugins:
- folke todo comments disabled
- dropped all AI integration
- added tiny-inline-diagnostic for easier and(!) wrapped diagnostic
  messages
- added sqlua.ncim plugin to connect to SQL databases
2025-09-08 08:28:03 +02:00
3ac01d9776 Enable more lsp 2025-08-18 08:38:30 +02:00
5 changed files with 79 additions and 179 deletions

13
after/ftplugin/org.lua Normal file
View File

@@ -0,0 +1,13 @@
-- make C-CR in insert mode behave like org_meta_return
-- in normal mode
vim.keymap.set(
"i",
"<C-CR>",
'<cmd>lua require("orgmode").action("org_mappings.meta_return")<CR>', {
silent = true,
buffer = true,
desc = 'ORG: meta return'
}
)

View File

@@ -82,7 +82,6 @@ local adjustedLogo = logo .. '\n' .. paddedGreeting .. '\n\n' .. userNamePadded
dashboard.section.header.val = vim.split(adjustedLogo, '\n') dashboard.section.header.val = vim.split(adjustedLogo, '\n')
dashboard.section.buttons.val = { dashboard.section.buttons.val = {
dashboard.button('o', '󱙺 AI Chat', '<cmd>OGPT<CR>'),
dashboard.button('d', ' Diary Entry', '<cmd>Diary<CR>'), dashboard.button('d', ' Diary Entry', '<cmd>Diary<CR>'),
dashboard.button('n', ' New file', ':ene <BAR> startinsert <CR>'), dashboard.button('n', ' New file', ':ene <BAR> startinsert <CR>'),
dashboard.button('s', ' Settings', '<cmd>WorkspacesOpen config-nvim<CR>'), dashboard.button('s', ' Settings', '<cmd>WorkspacesOpen config-nvim<CR>'),

View File

@@ -93,7 +93,7 @@ vim.keymap.set('n', '<space>mc', mywords.uhl_all, { desc = "Clear all highlights
------------------------------------------ ------------------------------------------
-- --
-- Some convenience keybindings -- Moving lines up and down
-- --
------------------------------------------ ------------------------------------------

View File

@@ -34,6 +34,7 @@ vim.api.nvim_create_autocmd('LspAttach', {
vim.keymap.set('n', '<space>]', vim.diagnostic.goto_next, { desc = "Previous diagnostics" }) vim.keymap.set('n', '<space>]', vim.diagnostic.goto_next, { desc = "Previous diagnostics" })
local gitsigns = require('gitsigns') local gitsigns = require('gitsigns')
vim.keymap.set('n', '<space>=l', ":NeogitLogCurrent<CR>", { desc = "Neogit: log for this file" })
vim.keymap.set('n', '<space>==', gitsigns.preview_hunk_inline, { desc = "Git hunk preview" }) vim.keymap.set('n', '<space>==', gitsigns.preview_hunk_inline, { desc = "Git hunk preview" })
vim.keymap.set('n', '<space>=B', gitsigns.blame, { desc = "Git blame file" }) vim.keymap.set('n', '<space>=B', gitsigns.blame, { desc = "Git blame file" })
vim.keymap.set('n', '<space>=D', function() gitsigns.diffthis('~') end, { desc = "Git diff this (~)" }) vim.keymap.set('n', '<space>=D', function() gitsigns.diffthis('~') end, { desc = "Git diff this (~)" })
@@ -98,7 +99,10 @@ local enable_this_lsp = {
'bashls', 'bashls',
'html', 'html',
'lua_ls', 'lua_ls',
'jsonls', 'jsonls', -- arch extra: vscode-json-languageserver
'kotlin_lsp', -- arch aur: kotlin-lsp-bin
'lemminx', -- arch aur: lemminx
'clangd',
} }
for l in pairs(enable_this_lsp) do for l in pairs(enable_this_lsp) do

View File

@@ -46,13 +46,16 @@ require("lazy").setup({
-- --
-- See :h blink-cmp-config-keymap for defining your own keymap -- See :h blink-cmp-config-keymap for defining your own keymap
keymap = { keymap = {
preset = 'enter', -- preset = 'enter',
['<Up>'] = { 'select_prev', 'fallback' }, preset = 'default',
['<Down>'] = { 'select_next', 'fallback' }, -- ['<Up>'] = { 'select_prev', 'fallback' },
['<S-Tab>'] = { 'select_prev', 'fallback' }, -- ['<Down>'] = { 'select_next', 'fallback' },
['<Tab>'] = { 'select_next', 'fallback' }, -- ['<S-Tab>'] = { 'select_prev', 'fallback' },
-- ['<Tab>'] = { 'select_next', 'fallback' },
['<CR>'] = { 'select_and_accept', 'fallback' }, ['<CR>'] = { 'select_and_accept', 'fallback' },
['<C-space>'] = { 'show', 'fallback' }, ['<C-space>'] = { 'show_and_insert', 'fallback' },
-- ['<C-space>'] = { 'show', 'fallback' },
-- ['<C-n>'] = { 'accept', 'fallback' },
}, },
signature = { enabled = true }, signature = { enabled = true },
@@ -80,7 +83,19 @@ require("lazy").setup({
-- Default list of enabled providers defined so that you can extend it -- Default list of enabled providers defined so that you can extend it
-- elsewhere in your config, without redefining it, due to `opts_extend` -- elsewhere in your config, without redefining it, due to `opts_extend`
sources = { sources = {
default = { 'lsp', 'path', 'snippets', 'buffer' }, default = { 'lsp', 'path', 'snippets', 'buffer', 'orgmode' },
-- per_filetype = {
-- org = { 'orgmode' }
-- },
providers = {
orgmode = {
name = 'Orgmode',
module = 'orgmode.org.autocompletion.blink',
fallbacks = { 'lsp', 'path', 'snippets', 'buffer' },
-- fallbacks = { 'buffer' },
},
},
}, },
snippets = { preset = 'luasnip' }, snippets = { preset = 'luasnip' },
@@ -138,7 +153,9 @@ require("lazy").setup({
"ibhagwan/fzf-lua", "ibhagwan/fzf-lua",
-- optional for icon support -- optional for icon support
dependencies = { "nvim-tree/nvim-web-devicons" }, dependencies = { "nvim-tree/nvim-web-devicons" },
config = true, config = function()
require('fzf-lua').register_ui_select()
end
}, },
@@ -385,15 +402,15 @@ require("lazy").setup({
-- TODO, WARN, HACK, PERF, NOTE, TEST and others highlighting and searching -- TODO, WARN, HACK, PERF, NOTE, TEST and others highlighting and searching
{ -- {
"folke/todo-comments.nvim", -- "folke/todo-comments.nvim",
dependencies = { "nvim-lua/plenary.nvim" }, -- dependencies = { "nvim-lua/plenary.nvim" },
opts = { -- opts = {
-- your configuration comes here -- -- your configuration comes here
-- or leave it empty to use the default settings -- -- or leave it empty to use the default settings
-- refer to the configuration section below -- -- refer to the configuration section below
} -- }
}, -- },
-- highlight word under cursor -- highlight word under cursor
{ {
@@ -450,6 +467,7 @@ require("lazy").setup({
}, },
}, },
-- show indent markers -- show indent markers
{ {
"lukas-reineke/indent-blankline.nvim", "lukas-reineke/indent-blankline.nvim",
@@ -459,166 +477,32 @@ require("lazy").setup({
opts = {}, opts = {},
}, },
-- ollama and LLM integration
-- improved (wrapping!) diagnostics
{ {
{ "rachartier/tiny-inline-diagnostic.nvim",
"huynle/ogpt.nvim", event = "VeryLazy", -- one of LspAttach, VeryLazy
event = "VeryLazy", priority = 1000, -- needs to be loaded in first
opts = { config = function()
default_provider = "ollama", require('tiny-inline-diagnostic').setup({
edgy = true, -- enable this! options = {
single_window = false, -- set this to true if you want only one OGPT window to appear at a time use_icons_from_diagnostic = true,
providers = { enable_on_insert = true,
ollama = { show_all_diags_on_cursorline = true,
api_host = os.getenv("OLLAMA_API_HOST") or "http://localhost:11434",
api_key = os.getenv("OLLAMA_API_KEY") or "",
model = "llama3.2-vision:sl",
}
} }
}, })
dependencies = { vim.diagnostic.config({ virtual_text = false }) -- Only if needed in your configuration, if you already have native LSP diagnostics
"MunifTanjim/nui.nvim", end
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim"
}
},
{
"folke/edgy.nvim",
event = "VeryLazy",
init = function()
vim.opt.laststatus = 3
vim.opt.splitkeep = "screen" -- or "topline" or "screen"
end,
opts = {
exit_when_last = false,
animate = {
enabled = false,
},
wo = {
winbar = true,
winfixwidth = true,
winfixheight = false,
winhighlight = "WinBar:EdgyWinBar,Normal:EdgyNormal",
spell = false,
signcolumn = "no",
},
keys = {
-- -- close window
["q"] = function(win)
win:close()
end,
-- close sidebar
["Q"] = function(win)
win.view.edgebar:close()
end,
-- increase width
["<S-Right>"] = function(win)
win:resize("width", 3)
end,
-- decrease width
["<S-Left>"] = function(win)
win:resize("width", -3)
end,
-- increase height
["<S-Up>"] = function(win)
win:resize("height", 3)
end,
-- decrease height
["<S-Down>"] = function(win)
win:resize("height", -3)
end,
},
right = {
{
title = "OGPT Popup",
ft = "ogpt-popup",
size = { width = 0.2 },
wo = {
wrap = true,
},
},
{
title = "OGPT Parameters",
ft = "ogpt-parameters-window",
size = { height = 6 },
wo = {
wrap = true,
},
},
{
title = "OGPT Template",
ft = "ogpt-template",
size = { height = 6 },
},
{
title = "OGPT Sessions",
ft = "ogpt-sessions",
size = { height = 6 },
wo = {
wrap = true,
},
},
{
title = "OGPT System Input",
ft = "ogpt-system-window",
size = { height = 6 },
},
{
title = "OGPT",
ft = "ogpt-window",
size = { height = 0.5 },
wo = {
wrap = true,
},
},
{
title = "OGPT {{{selection}}}",
ft = "ogpt-selection",
size = { width = 80, height = 4 },
wo = {
wrap = true,
},
},
{
title = "OGPt {{{instruction}}}",
ft = "ogpt-instruction",
size = { width = 80, height = 4 },
wo = {
wrap = true,
},
},
{
title = "OGPT Chat",
ft = "ogpt-input",
size = { width = 80, height = 4 },
wo = {
wrap = true,
},
},
},
},
},
-- improved (wrapping!) diagnostics
{
"rachartier/tiny-inline-diagnostic.nvim",
event = "VeryLazy", -- one of LspAttach, VeryLazy
priority = 1000, -- needs to be loaded in first
config = function()
require('tiny-inline-diagnostic').setup({
options = {
use_icons_from_diagnostic = true,
enable_on_insert = true,
show_all_diags_on_cursorline = true,
}
})
vim.diagnostic.config({ virtual_text = false }) -- Only if needed in your configuration, if you already have native LSP diagnostics
end
},
-- new plugins here
}, },
-- 2025-05-21 not yet clear if this is a good thing or not
{
'xemptuous/sqlua.nvim',
lazy = true,
cmd = 'SQLua',
config = function() require('sqlua').setup() end
},
-- new plugins BEFORE here
}) })