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
This commit is contained in:
@@ -82,7 +82,6 @@ local adjustedLogo = logo .. '\n' .. paddedGreeting .. '\n\n' .. userNamePadded
|
||||
dashboard.section.header.val = vim.split(adjustedLogo, '\n')
|
||||
|
||||
dashboard.section.buttons.val = {
|
||||
dashboard.button('o', ' AI Chat', '<cmd>OGPT<CR>'),
|
||||
dashboard.button('d', ' Diary Entry', '<cmd>Diary<CR>'),
|
||||
dashboard.button('n', ' New file', ':ene <BAR> startinsert <CR>'),
|
||||
dashboard.button('s', ' Settings', '<cmd>WorkspacesOpen config-nvim<CR>'),
|
||||
|
||||
@@ -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
|
||||
--
|
||||
------------------------------------------
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
||||
vim.keymap.set('n', '<space>]', vim.diagnostic.goto_next, { desc = "Previous diagnostics" })
|
||||
|
||||
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>=B', gitsigns.blame, { desc = "Git blame file" })
|
||||
vim.keymap.set('n', '<space>=D', function() gitsigns.diffthis('~') end, { desc = "Git diff this (~)" })
|
||||
|
||||
232
lua/plugins.lua
232
lua/plugins.lua
@@ -46,13 +46,16 @@ require("lazy").setup({
|
||||
--
|
||||
-- See :h blink-cmp-config-keymap for defining your own keymap
|
||||
keymap = {
|
||||
preset = 'enter',
|
||||
['<Up>'] = { 'select_prev', 'fallback' },
|
||||
['<Down>'] = { 'select_next', 'fallback' },
|
||||
['<S-Tab>'] = { 'select_prev', 'fallback' },
|
||||
['<Tab>'] = { 'select_next', 'fallback' },
|
||||
-- preset = 'enter',
|
||||
preset = 'default',
|
||||
-- ['<Up>'] = { 'select_prev', 'fallback' },
|
||||
-- ['<Down>'] = { 'select_next', 'fallback' },
|
||||
-- ['<S-Tab>'] = { 'select_prev', 'fallback' },
|
||||
-- ['<Tab>'] = { 'select_next', '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 },
|
||||
|
||||
@@ -80,7 +83,19 @@ require("lazy").setup({
|
||||
-- Default list of enabled providers defined so that you can extend it
|
||||
-- elsewhere in your config, without redefining it, due to `opts_extend`
|
||||
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' },
|
||||
@@ -385,15 +400,15 @@ require("lazy").setup({
|
||||
|
||||
|
||||
-- TODO, WARN, HACK, PERF, NOTE, TEST and others highlighting and searching
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
opts = {
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
}
|
||||
},
|
||||
-- {
|
||||
-- "folke/todo-comments.nvim",
|
||||
-- dependencies = { "nvim-lua/plenary.nvim" },
|
||||
-- opts = {
|
||||
-- -- your configuration comes here
|
||||
-- -- or leave it empty to use the default settings
|
||||
-- -- refer to the configuration section below
|
||||
-- }
|
||||
-- },
|
||||
|
||||
-- highlight word under cursor
|
||||
{
|
||||
@@ -450,6 +465,7 @@ require("lazy").setup({
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
-- show indent markers
|
||||
{
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
@@ -459,166 +475,32 @@ require("lazy").setup({
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- ollama and LLM integration
|
||||
|
||||
-- improved (wrapping!) diagnostics
|
||||
{
|
||||
{
|
||||
"huynle/ogpt.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
default_provider = "ollama",
|
||||
edgy = true, -- enable this!
|
||||
single_window = false, -- set this to true if you want only one OGPT window to appear at a time
|
||||
providers = {
|
||||
ollama = {
|
||||
api_host = os.getenv("OLLAMA_API_HOST") or "http://localhost:11434",
|
||||
api_key = os.getenv("OLLAMA_API_KEY") or "",
|
||||
model = "llama3.2-vision:sl",
|
||||
}
|
||||
"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,
|
||||
}
|
||||
},
|
||||
dependencies = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
"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
|
||||
|
||||
})
|
||||
vim.diagnostic.config({ virtual_text = false }) -- Only if needed in your configuration, if you already have native LSP diagnostics
|
||||
end
|
||||
},
|
||||
|
||||
|
||||
-- 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
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user