Compare commits
21 Commits
15e21f333f
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 87ab333ec9 | |||
| 93e281cbb5 | |||
| 4bd4d87f5b | |||
| 3ac01d9776 | |||
| 08784c625a | |||
| 59f4064788 | |||
| 74baebf3f8 | |||
| 3b7c034926 | |||
| 12152a20db | |||
| 3e6c115673 | |||
| fd6dd0ba8c | |||
| ee7157a23a | |||
| 3e3d7b8173 | |||
| 19cfaeab49 | |||
| 5b41b4d781 | |||
| 9faa5209bb | |||
| 36487d273e | |||
| 5b58207e16 | |||
| 270222bb57 | |||
| 75f9692e7d | |||
| 4bb854c54d |
13
after/ftplugin/org.lua
Normal file
13
after/ftplugin/org.lua
Normal 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'
|
||||||
|
}
|
||||||
|
)
|
||||||
1
init.lua
1
init.lua
@@ -7,3 +7,4 @@ require('colorscheme')
|
|||||||
require('lsp')
|
require('lsp')
|
||||||
require('keybindings')
|
require('keybindings')
|
||||||
require('diary')
|
require('diary')
|
||||||
|
require('layout')
|
||||||
|
|||||||
@@ -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>'),
|
||||||
|
|||||||
@@ -1,31 +1,3 @@
|
|||||||
-- an alternative might be:
|
|
||||||
-- https://github.com/nvim-treesitter/nvim-treesitter-context
|
|
||||||
local function breadcrumb()
|
|
||||||
local result = require 'nvim-treesitter'.statusline(
|
|
||||||
{
|
|
||||||
type_patterns = {
|
|
||||||
"class",
|
|
||||||
"impl",
|
|
||||||
"function",
|
|
||||||
"method",
|
|
||||||
"import",
|
|
||||||
"for",
|
|
||||||
"if",
|
|
||||||
"while",
|
|
||||||
"variable",
|
|
||||||
"comment",
|
|
||||||
},
|
|
||||||
separator = " ▶ "
|
|
||||||
}
|
|
||||||
)
|
|
||||||
if result == "" then
|
|
||||||
result = ' '
|
|
||||||
elseif result == nil then
|
|
||||||
result = ''
|
|
||||||
end
|
|
||||||
return result
|
|
||||||
end
|
|
||||||
|
|
||||||
require("lualine").setup {
|
require("lualine").setup {
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = false,
|
icons_enabled = false,
|
||||||
@@ -49,7 +21,7 @@
|
|||||||
lualine_a = { { 'filename', path = 1, shorting_target = 50 } },
|
lualine_a = { { 'filename', path = 1, shorting_target = 50 } },
|
||||||
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
||||||
lualine_c = {},
|
lualine_c = {},
|
||||||
lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
lualine_x = { 'encoding', 'fileformat', 'filetype', 'lsp_status' },
|
||||||
lualine_y = { 'filesize' },
|
lualine_y = { 'filesize' },
|
||||||
lualine_z = { 'progress', 'location' }
|
lualine_z = { 'progress', 'location' }
|
||||||
},
|
},
|
||||||
@@ -63,22 +35,7 @@
|
|||||||
lualine_z = { 'location' }
|
lualine_z = { 'location' }
|
||||||
},
|
},
|
||||||
tabline = {},
|
tabline = {},
|
||||||
winbar = {
|
winbar = {}, -- formerly breadcrumb here
|
||||||
lualine_a = {
|
inactive_winbar = {},
|
||||||
{
|
|
||||||
breadcrumb,
|
|
||||||
color = { bg = '#2a2a2a', fg = '#cfcfcf' },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
inactive_winbar = {
|
|
||||||
lualine_a = {
|
|
||||||
{
|
|
||||||
breadcrumb,
|
|
||||||
color = { bg = '#101010', fg = '#999999' },
|
|
||||||
draw_empty = true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
extensions = {}
|
extensions = {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,9 @@ vim.keymap.set('n', '<leader>C', ":Calendar -view=year -split=vertical -width=27
|
|||||||
-- Open current file in browser (chromium)
|
-- Open current file in browser (chromium)
|
||||||
vim.keymap.set('n', '<space>o', ":silent !chromium '%'<cr>", { desc = "Open in browser" })
|
vim.keymap.set('n', '<space>o', ":silent !chromium '%'<cr>", { desc = "Open in browser" })
|
||||||
|
|
||||||
|
-- Open org file folder in neotree
|
||||||
|
vim.keymap.set('n', '<leader>of', ':silent :Neotree dir=/home/saschal/Documents/Eigene\\ (Briefe\\ etc.)/org<cr>', { desc = "Open org folder" })
|
||||||
|
|
||||||
-- toggle colorscheme between dark and light
|
-- toggle colorscheme between dark and light
|
||||||
vim.keymap.set('n', '<leader>m', function()
|
vim.keymap.set('n', '<leader>m', function()
|
||||||
if vim.opt.background:get() == "dark" then
|
if vim.opt.background:get() == "dark" then
|
||||||
@@ -61,6 +64,22 @@ local workspaces_fzf_picker = function(opts)
|
|||||||
end
|
end
|
||||||
vim.keymap.set('n', '<leader>w', workspaces_fzf_picker, { desc = "Workspaces" })
|
vim.keymap.set('n', '<leader>w', workspaces_fzf_picker, { desc = "Workspaces" })
|
||||||
|
|
||||||
|
------------------------------------------
|
||||||
|
--
|
||||||
|
-- Window layout save and restore
|
||||||
|
--
|
||||||
|
------------------------------------------
|
||||||
|
|
||||||
|
local layout = require('layout')
|
||||||
|
vim.keymap.set('n', '<leader>ss', function()
|
||||||
|
layout.save('default')
|
||||||
|
print("Window layout saved")
|
||||||
|
end, { desc = "Save window layout" })
|
||||||
|
vim.keymap.set('n', '<leader>sr', function()
|
||||||
|
layout.restore('default')
|
||||||
|
print("Window layout restored")
|
||||||
|
end, { desc = "Restore window layout" })
|
||||||
|
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
--
|
--
|
||||||
-- Word higlighting
|
-- Word higlighting
|
||||||
@@ -74,7 +93,7 @@ vim.keymap.set('n', '<space>mc', mywords.uhl_all, { desc = "Clear all highlights
|
|||||||
|
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
--
|
--
|
||||||
-- Some convenience keybindings
|
-- Moving lines up and down
|
||||||
--
|
--
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
|
|
||||||
|
|||||||
71
lua/layout.lua
Normal file
71
lua/layout.lua
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
-- save and restore current window layout
|
||||||
|
-- inspired by:
|
||||||
|
-- - https://github.com/dedowsdi/.vim/blob/master/autoload/ddd/layout.vim
|
||||||
|
-- - https://vi.stackexchange.com/a/22545/53081
|
||||||
|
--
|
||||||
|
-- added cursor position handling
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
local layouts = {}
|
||||||
|
local resize_cmds = {}
|
||||||
|
|
||||||
|
function M.save(name)
|
||||||
|
layouts[name] = vim.fn.winlayout()
|
||||||
|
resize_cmds[name] = vim.fn.winrestcmd()
|
||||||
|
M.add_buf_to_layout(layouts[name])
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.add_buf_to_layout(layout)
|
||||||
|
if layout[1] == "leaf" then
|
||||||
|
local win_id = layout[2]
|
||||||
|
table.insert(layout, vim.fn.winbufnr(win_id))
|
||||||
|
table.insert(layout, vim.api.nvim_win_get_cursor(win_id))
|
||||||
|
else
|
||||||
|
for _, child_layout in ipairs(layout[2]) do
|
||||||
|
M.add_buf_to_layout(child_layout)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.restore(name)
|
||||||
|
if not layouts[name] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Create clean window
|
||||||
|
vim.cmd("new")
|
||||||
|
vim.cmd("wincmd o")
|
||||||
|
|
||||||
|
-- Recursively restore buffers and cursor positions
|
||||||
|
M.apply_layout(layouts[name], name)
|
||||||
|
|
||||||
|
-- Resize
|
||||||
|
vim.cmd(resize_cmds[name])
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.apply_layout(layout, name)
|
||||||
|
if layout[1] == "leaf" then
|
||||||
|
-- Load buffer for leaf
|
||||||
|
if vim.fn.bufexists(layout[3]) == 1 then
|
||||||
|
vim.cmd(string.format("b %d", layout[3]))
|
||||||
|
-- Restore cursor position
|
||||||
|
vim.api.nvim_win_set_cursor(vim.fn.win_getid(), layout[4])
|
||||||
|
end
|
||||||
|
else
|
||||||
|
-- Split cols or rows, split n-1 times
|
||||||
|
local split_method = layout[1] == "col" and "rightbelow split" or "rightbelow vsplit"
|
||||||
|
local wins = { vim.fn.win_getid() }
|
||||||
|
for i = 2, #layout[2] do
|
||||||
|
vim.cmd(split_method)
|
||||||
|
table.insert(wins, vim.fn.win_getid())
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Recursive into child windows
|
||||||
|
for index, win_id in ipairs(wins) do
|
||||||
|
vim.fn.win_gotoid(win_id)
|
||||||
|
M.apply_layout(layout[2][index], name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
69
lua/lsp.lua
69
lua/lsp.lua
@@ -1,4 +1,4 @@
|
|||||||
-- attach using autocommand, much better than doing it during mason
|
-- attach using autocommand and setup keybindings
|
||||||
vim.api.nvim_create_autocmd('LspAttach', {
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
group = vim.api.nvim_create_augroup('sl.lsp', {}),
|
group = vim.api.nvim_create_augroup('sl.lsp', {}),
|
||||||
callback = function(args)
|
callback = function(args)
|
||||||
@@ -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 (~)" })
|
||||||
@@ -45,6 +46,8 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|||||||
vim.keymap.set('n', '<space>=d', gitsigns.diffthis, { desc = "Git diff this" })
|
vim.keymap.set('n', '<space>=d', gitsigns.diffthis, { desc = "Git diff this" })
|
||||||
vim.keymap.set('n', '<space>=r', gitsigns.reset_hunk, { desc = "Git reset hunk" })
|
vim.keymap.set('n', '<space>=r', gitsigns.reset_hunk, { desc = "Git reset hunk" })
|
||||||
vim.keymap.set('n', '<space>=s', gitsigns.stage_hunk, { desc = "Git stage hunk" })
|
vim.keymap.set('n', '<space>=s', gitsigns.stage_hunk, { desc = "Git stage hunk" })
|
||||||
|
vim.keymap.set('v', '<space>=s', function() gitsigns.stage_hunk({ vim.fn.line('.'), vim.fn.line('v') }) end,
|
||||||
|
{ desc = "Git stage hunk" })
|
||||||
|
|
||||||
-- vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
|
-- vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
|
||||||
vim.keymap.set('n', '<C-,>', fzf.lsp_references, { desc = "Find References" })
|
vim.keymap.set('n', '<C-,>', fzf.lsp_references, { desc = "Find References" })
|
||||||
@@ -52,28 +55,6 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
require('mason').setup({
|
|
||||||
ui = {
|
|
||||||
icons = {
|
|
||||||
package_installed = "✓",
|
|
||||||
package_pending = "➜",
|
|
||||||
package_uninstalled = "✗"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
require('mason-lspconfig').setup({
|
|
||||||
-- A list of servers to automatically install if they're not already installed
|
|
||||||
ensure_installed = {
|
|
||||||
'lua_ls',
|
|
||||||
-- 'rust_analyzer', -- handled by rust mrcjkb/rustaceanvim
|
|
||||||
'yamlls',
|
|
||||||
'ts_ls',
|
|
||||||
'gopls',
|
|
||||||
'clangd',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- lsp format selected range
|
-- lsp format selected range
|
||||||
function LSPRangeFormatFunction()
|
function LSPRangeFormatFunction()
|
||||||
vim.lsp.buf.format({
|
vim.lsp.buf.format({
|
||||||
@@ -85,21 +66,49 @@ function LSPRangeFormatFunction()
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Set different settings for different languages' LSP
|
|
||||||
local lspconfig = require('lspconfig')
|
|
||||||
|
|
||||||
lspconfig.ts_ls.setup {
|
-- VUE and Typescript as of vue-language-server 3.0.x
|
||||||
init_options = {
|
-- taken from:
|
||||||
plugins = {
|
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#vtsls
|
||||||
{
|
local vue_language_server_path = '/home/saschal/.config/yarn/global/node_modules'
|
||||||
|
local vue_plugin = {
|
||||||
name = '@vue/typescript-plugin',
|
name = '@vue/typescript-plugin',
|
||||||
location = vim.fn.expand '$MASON/packages' .. '/vue-language-server' .. '/node_modules/@vue/language-server',
|
location = vue_language_server_path,
|
||||||
languages = { 'vue' },
|
languages = { 'vue' },
|
||||||
|
configNamespace = 'typescript',
|
||||||
|
}
|
||||||
|
local vtsls_config = {
|
||||||
|
settings = {
|
||||||
|
vtsls = {
|
||||||
|
tsserver = {
|
||||||
|
globalPlugins = {
|
||||||
|
vue_plugin,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
|
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
|
||||||
}
|
}
|
||||||
|
vim.lsp.config('vtsls', vtsls_config)
|
||||||
|
|
||||||
|
-- enable this list of lsps
|
||||||
|
local enable_this_lsp = {
|
||||||
|
'vue_ls',
|
||||||
|
'vtsls',
|
||||||
|
'gopls',
|
||||||
|
'bashls',
|
||||||
|
'html',
|
||||||
|
'lua_ls',
|
||||||
|
'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
|
||||||
|
vim.lsp.enable(enable_this_lsp[l])
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- add autoformat to Dioxus projects
|
-- add autoformat to Dioxus projects
|
||||||
vim.api.nvim_create_autocmd("BufWritePost", {
|
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ vim.opt.number = true -- show absolute number
|
|||||||
vim.opt.relativenumber = false -- add numbers to each line on the left side
|
vim.opt.relativenumber = false -- add numbers to each line on the left side
|
||||||
vim.opt.cursorline = true -- highlight cursor line underneath the cursor horizontally
|
vim.opt.cursorline = true -- highlight cursor line underneath the cursor horizontally
|
||||||
vim.opt.guicursor = "" .. -- cursor highlight group needs to be Cursor to have lunaperche have a proper light cursor
|
vim.opt.guicursor = "" .. -- cursor highlight group needs to be Cursor to have lunaperche have a proper light cursor
|
||||||
"n-v-c-sm:block-Cursor,i-ci-ve:ver25-Cursor,r-cr-o:hor20,t:block-blinkon500-blinkoff500-TermCursor"
|
"n-v-c-sm:block-Cursor,i-ci-ve:ver25-Cursor,r-cr-o:hor20,t:block-blinkon500-blinkoff500-Cursor"
|
||||||
vim.opt.splitbelow = true -- open new vertical split bottom
|
vim.opt.splitbelow = true -- open new vertical split bottom
|
||||||
vim.opt.splitright = true -- open new horizontal splits right
|
vim.opt.splitright = true -- open new horizontal splits right
|
||||||
vim.opt.termguicolors = true -- enable 24-bit RGB color in the TUI
|
vim.opt.termguicolors = true -- enable 24-bit RGB color in the TUI
|
||||||
|
|||||||
251
lua/plugins.lua
251
lua/plugins.lua
@@ -45,7 +45,18 @@ require("lazy").setup({
|
|||||||
-- C-k: Toggle signature help (if signature.enabled = true)
|
-- C-k: Toggle signature help (if signature.enabled = true)
|
||||||
--
|
--
|
||||||
-- See :h blink-cmp-config-keymap for defining your own keymap
|
-- See :h blink-cmp-config-keymap for defining your own keymap
|
||||||
keymap = { preset = 'enter' },
|
keymap = {
|
||||||
|
-- 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_and_insert', 'fallback' },
|
||||||
|
-- ['<C-space>'] = { 'show', 'fallback' },
|
||||||
|
-- ['<C-n>'] = { 'accept', 'fallback' },
|
||||||
|
},
|
||||||
signature = { enabled = true },
|
signature = { enabled = true },
|
||||||
|
|
||||||
appearance = {
|
appearance = {
|
||||||
@@ -72,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' },
|
||||||
@@ -102,8 +125,8 @@ require("lazy").setup({
|
|||||||
--
|
--
|
||||||
-- LSP manager and others
|
-- LSP manager and others
|
||||||
--
|
--
|
||||||
"williamboman/mason.nvim",
|
-- "williamboman/mason.nvim",
|
||||||
"williamboman/mason-lspconfig.nvim",
|
-- "williamboman/mason-lspconfig.nvim",
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
|
|
||||||
-- Nice plugin to show what LSPs are doing in the background (and others
|
-- Nice plugin to show what LSPs are doing in the background (and others
|
||||||
@@ -125,6 +148,17 @@ require("lazy").setup({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- fzf-lua
|
||||||
|
{
|
||||||
|
"ibhagwan/fzf-lua",
|
||||||
|
-- optional for icon support
|
||||||
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
config = function()
|
||||||
|
require('fzf-lua').register_ui_select()
|
||||||
|
end
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
-- neogit setup
|
-- neogit setup
|
||||||
{
|
{
|
||||||
"NeogitOrg/neogit",
|
"NeogitOrg/neogit",
|
||||||
@@ -151,10 +185,13 @@ require("lazy").setup({
|
|||||||
config = function()
|
config = function()
|
||||||
-- Setup orgmode
|
-- Setup orgmode
|
||||||
require('orgmode').setup({
|
require('orgmode').setup({
|
||||||
|
-- cf: https://github.com/nvim-orgmode/orgmode/blob/master/docs/configuration.org#mappings
|
||||||
mappings = {
|
mappings = {
|
||||||
org = {
|
org = {
|
||||||
org_move_subtree_up = { '<Leader>oK', '<C-M-Up>' },
|
org_move_subtree_up = { '<Leader>oK', '<C-M-Up>' },
|
||||||
org_move_subtree_down = { '<Leader>oJ', '<C-M-Down>' },
|
org_move_subtree_down = { '<Leader>oJ', '<C-M-Down>' },
|
||||||
|
org_promote_subtree = { '<s', '<C-M-Left>' },
|
||||||
|
org_demote_subtree = { '>s', '<C-M-Right>' },
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
-- org_agenda_files = '~/orgfiles/**/*',
|
-- org_agenda_files = '~/orgfiles/**/*',
|
||||||
@@ -215,19 +252,6 @@ require("lazy").setup({
|
|||||||
-- comfortable table editing, esp. used in orgmode
|
-- comfortable table editing, esp. used in orgmode
|
||||||
{ 'dhruvasagar/vim-table-mode' },
|
{ 'dhruvasagar/vim-table-mode' },
|
||||||
|
|
||||||
-- fzf-lua
|
|
||||||
{
|
|
||||||
"ibhagwan/fzf-lua",
|
|
||||||
-- optional for icon support
|
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
|
||||||
config = function()
|
|
||||||
-- calling `setup` is optional for customization
|
|
||||||
local fzf = require("fzf-lua")
|
|
||||||
fzf.setup({ "default-title" })
|
|
||||||
fzf.register_ui_select()
|
|
||||||
end
|
|
||||||
},
|
|
||||||
|
|
||||||
-- which-key
|
-- which-key
|
||||||
{
|
{
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
@@ -378,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
|
||||||
{
|
{
|
||||||
@@ -398,11 +422,6 @@ require("lazy").setup({
|
|||||||
"itchyny/calendar.vim"
|
"itchyny/calendar.vim"
|
||||||
},
|
},
|
||||||
|
|
||||||
-- treesitter asciidoc support
|
|
||||||
-- // NOTE.2025-01-17 seems to be broken
|
|
||||||
-- { "cpkio/nvim-treesitter-asciidoc" },
|
|
||||||
|
|
||||||
|
|
||||||
-- Greeter to run on NeoVim startup
|
-- Greeter to run on NeoVim startup
|
||||||
{
|
{
|
||||||
'goolord/alpha-nvim',
|
'goolord/alpha-nvim',
|
||||||
@@ -448,6 +467,7 @@ require("lazy").setup({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
-- show indent markers
|
-- show indent markers
|
||||||
{
|
{
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
@@ -457,147 +477,32 @@ require("lazy").setup({
|
|||||||
opts = {},
|
opts = {},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- ollama and LLM integration
|
|
||||||
{
|
|
||||||
{
|
|
||||||
"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",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
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,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- new plugins here
|
-- 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
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
-- 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