Compare commits

...

2 Commits

44 changed files with 756 additions and 624 deletions

12
.stylua.toml 100644
View File

@ -0,0 +1,12 @@
syntax = "All"
column_width = 120
line_endings = "Unix"
indent_type = "Tabs"
indent_width = 4
quote_style = "AutoPreferSingle"
call_parentheses = "Always"
collapse_simple_statement = "Never"
space_after_function_names = "Never"
[sort_requires]
enabled = false

View File

@ -23,6 +23,7 @@ cargo install --force fd-find
cargo install --force bat cargo install --force bat
cargo install --force git-delta cargo install --force git-delta
cargo install --force skim cargo install --force skim
cargo install --force stylua
# Python # Python
## - FIRST, install uv ## - FIRST, install uv
@ -52,3 +53,7 @@ uv init --no-readme --python 3.12 remote-python
cd remote-python cd remote-python
uv add pynvim jupyter_client requests websocket-client plotly kaleido==0.2.1 uv add pynvim jupyter_client requests websocket-client plotly kaleido==0.2.1
``` ```
INSTALLATION EXPERIENCES:
- need libreadline-dev and libmagickwand-dev

View File

@ -11,7 +11,7 @@ vim.g.maplocalleader = ' '
vim.g.have_nerd_font = true vim.g.have_nerd_font = true
-- [[ Remote Python ]] -- [[ Remote Python ]]
local remote_python_path = vim.fn.stdpath("config") .. '/remote-python' local remote_python_path = vim.fn.stdpath('config') .. '/remote-python'
vim.g.python3_host_prog = remote_python_path .. '/.venv/bin/python' vim.g.python3_host_prog = remote_python_path .. '/.venv/bin/python'
-- [[ Vim Options ]] -- [[ Vim Options ]]

View File

@ -8,6 +8,7 @@
"fzf-lua": { "branch": "main", "commit": "e3fefd97875827e47dc4bbf1074ee464b2d8e6a8" }, "fzf-lua": { "branch": "main", "commit": "e3fefd97875827e47dc4bbf1074ee464b2d8e6a8" },
"fzf-lua-projections.nvim": { "branch": "main", "commit": "411672ab6f7c38d3a4a51916fda1a01c1618ae04" }, "fzf-lua-projections.nvim": { "branch": "main", "commit": "411672ab6f7c38d3a4a51916fda1a01c1618ae04" },
"gitsigns.nvim": { "branch": "main", "commit": "9b36d497495436c135659902054ee637e0ba6021" }, "gitsigns.nvim": { "branch": "main", "commit": "9b36d497495436c135659902054ee637e0ba6021" },
"hererocks": { "branch": "master", "commit": "c9c5444dea1e07e005484014a8231aa667be30b6" },
"image.nvim": { "branch": "master", "commit": "7704e1d03d952393774dc7d00a98d8e127086ba4" }, "image.nvim": { "branch": "master", "commit": "7704e1d03d952393774dc7d00a98d8e127086ba4" },
"img-clip.nvim": { "branch": "main", "commit": "5ded6f468d633ccfb315905fe8901d6c95ae8f29" }, "img-clip.nvim": { "branch": "main", "commit": "5ded6f468d633ccfb315905fe8901d6c95ae8f29" },
"lazy.nvim": { "branch": "main", "commit": "f15a93907ddad3d9139aea465ae18336d87f5ce6" }, "lazy.nvim": { "branch": "main", "commit": "f15a93907ddad3d9139aea465ae18336d87f5ce6" },

View File

@ -1,7 +1,7 @@
return { return {
cmd = { 'basedpyright-langserver', '--stdio' }, cmd = { 'basedpyright-langserver', '--stdio' },
filetypes = { 'python' }, filetypes = { 'python' },
root_markers = { "pyproject.toml" }, root_markers = { 'pyproject.toml' },
settings = { settings = {
basedpyright = { basedpyright = {
disableOrganizeImports = true, disableOrganizeImports = true,

View File

@ -4,6 +4,9 @@ return {
root_markers = { '.luarc.json', '.luarc.jsonc' }, root_markers = { '.luarc.json', '.luarc.jsonc' },
settings = { settings = {
Lua = { Lua = {
format = {
enable = false,
},
runtime = { runtime = {
version = 'LuaJIT', version = 'LuaJIT',
}, },
@ -13,7 +16,7 @@ return {
vim.env.VIMRUNTIME, vim.env.VIMRUNTIME,
}, },
}, },
telemetry = {enable = false}, telemetry = { enable = false },
}, },
}, },
} }

View File

@ -1,5 +1,5 @@
return { return {
cmd = { 'ruff', 'server' }, cmd = { 'ruff', 'server' },
filetypes = { 'python' }, filetypes = { 'python' },
root_markers = { "pyproject.toml" }, root_markers = { 'pyproject.toml' },
} }

View File

@ -1,5 +1,5 @@
return { return {
cmd = { 'rust-analyzer' }, cmd = { 'rust-analyzer' },
filetypes = { 'rust' }, filetypes = { 'rust' },
root_markers = { "Cargo.toml" }, root_markers = { 'Cargo.toml' },
} }

View File

@ -1,5 +1,5 @@
-- [[ Autocommands ]] -- [[ Autocommands ]]
-- See `:help lua-guide-autocommands` -- See `:help lua-guide-autocommands`
require 'autocmds/lsp' require('autocmds/lsp')
require 'autocmds/yank_hl' require('autocmds/yank_hl')

View File

@ -6,6 +6,10 @@ vim.keymap.del('n', 'gri')
vim.keymap.del('n', 'gO') vim.keymap.del('n', 'gO')
vim.keymap.del('i', '<c-s>') vim.keymap.del('i', '<c-s>')
local startswith = function(text, prefix)
return text:find(prefix, 1, true) == 1
end
vim.api.nvim_create_autocmd('LspAttach', { vim.api.nvim_create_autocmd('LspAttach', {
callback = function(args) callback = function(args)
-- See: https://neovim.io/doc/user/lsp.html#lsp-defaults -- See: https://neovim.io/doc/user/lsp.html#lsp-defaults
@ -17,12 +21,7 @@ vim.api.nvim_create_autocmd('LspAttach', {
-- LSP: Code Completion -- LSP: Code Completion
if lsp_client:supports_method('textDocument/completion') then if lsp_client:supports_method('textDocument/completion') then
vim.lsp.completion.enable( vim.lsp.completion.enable(true, lsp_client.id, buf, { autotrigger = false })
true,
lsp_client.id,
buf,
{ autotrigger = false }
)
end end
-- LSP: Diagnostics -- LSP: Diagnostics
@ -31,32 +30,24 @@ vim.api.nvim_create_autocmd('LspAttach', {
'n', 'n',
'<leader>le', '<leader>le',
require('fzf-lua').diagnostics_document, require('fzf-lua').diagnostics_document,
{ buffer = buf, desc = '[L]SP [E]rrors' }) { buffer = buf, desc = '[L]SP [E]rrors' }
)
end end
-- LSP: Diagnostics -- LSP: Diagnostics
if lsp_client:supports_method('textDocument/signatureHelp') then if lsp_client:supports_method('textDocument/signatureHelp') then
vim.keymap.set( vim.keymap.set('i', '<c-s>', vim.lsp.buf.signature_help, { buffer = buf, desc = 'LSP Signature Help' })
'i',
'<c-s>',
vim.lsp.buf.signature_help,
{ buffer = buf, desc = 'LSP Signature Help' })
end end
-- LSP Action: Formatting -- LSP Action: Formatting
if lsp_client:supports_method('textDocument/formatting') or lsp_client.name == 'otter-ls[1]' then if lsp_client:supports_method('textDocument/formatting') or startswith(lsp_client.name, 'otter-ls') then
vim.keymap.set( vim.keymap.set('n', '<leader>lf', function()
'n', require('conform').format({
'<leader>lf', async = true,
function() bufnr = buf,
require('conform').format({ id = lsp_client.id,
async = true, })
bufnr = buf, end, { buffer = buf, desc = '[L]SP [F]ormat' })
id = lsp_client.id,
})
end,
{ buffer = buf, desc = '[L]SP [F]ormat' }
)
-- Format the current buffer on save -- Format the current buffer on save
--- TODO: Only on filetypes w/fast formatters? --- TODO: Only on filetypes w/fast formatters?
@ -75,21 +66,16 @@ vim.api.nvim_create_autocmd('LspAttach', {
-- LSP Action: Inlay Hint -- LSP Action: Inlay Hint
--- WORKAROUND: otter-ls seems to crash with inlayHint. --- WORKAROUND: otter-ls seems to crash with inlayHint.
if lsp_client:supports_method('textDocument/inlayHint') and not lsp_client.name == 'otter-ls[1]' then if lsp_client:supports_method('textDocument/inlayHint') and not startswith(lsp_client.name, 'otter-ls') then
vim.lsp.inlay_hint.enable(true, { bufnr = buf }) vim.lsp.inlay_hint.enable(true, { bufnr = buf })
vim.keymap.set( vim.keymap.set('n', '<leader>lh', function()
'n', if vim.lsp.inlay_hint.is_enabled({ bufnr = buf }) then
'<leader>lh', vim.lsp.inlay_hint.enable(false, { bufnr = buf })
function() else
if vim.lsp.inlay_hint.is_enabled({ bufnr = buf }) then vim.lsp.inlay_hint.enable(true, { bufnr = buf })
vim.lsp.inlay_hint.enable(false, { bufnr = buf }) end
else end, { desc = '[L]SP Toggle Inlay [H]ints' })
vim.lsp.inlay_hint.enable(true, { bufnr = buf })
end
end,
{ desc = '[L]SP Toggle Inlay [H]ints' }
)
end end
-- LSP Action: Code Actions -- LSP Action: Code Actions
@ -104,42 +90,31 @@ vim.api.nvim_create_autocmd('LspAttach', {
-- LSP Action: Rename -- LSP Action: Rename
if lsp_client:supports_method('textDocument/rename') then if lsp_client:supports_method('textDocument/rename') then
vim.keymap.set( vim.keymap.set('n', '<leader>lr', vim.lsp.buf.rename, { buffer = buf, desc = '[L]SP [R]ename' })
'n',
'<leader>lr',
vim.lsp.buf.rename,
{ buffer = buf, desc = '[L]SP [R]ename' }
)
end end
-- LSP Action: "Hover" -- LSP Action: "Hover"
if lsp_client:supports_method('textDocument/hover') then if lsp_client:supports_method('textDocument/hover') then
vim.keymap.set( vim.keymap.set('n', 'K', vim.lsp.buf.hover, { buffer = buf, desc = '[L]SP Hover' })
'n',
'K',
vim.lsp.buf.hover,
{ buffer = buf, desc = '[L]SP Hover' }
)
end end
-- LSP Action: References -- LSP Action: References
if ( if
lsp_client:supports_method('textDocument/references') lsp_client:supports_method('textDocument/references')
or lsp_client:supports_method('textDocument/typeDefinition') or lsp_client:supports_method('textDocument/typeDefinition')
or lsp_client:supports_method('textDocument/definition') or lsp_client:supports_method('textDocument/definition')
) then then
vim.keymap.set( vim.keymap.set('n', '<leader>ld', require('fzf-lua').lsp_finder, { buffer = buf, desc = '[L]SP Fin[D]er' })
'n',
'<leader>ld',
require('fzf-lua').lsp_finder,
{ buffer = buf, desc = '[L]SP Fin[D]er' }
)
end end
-- LSP Action: List Buffer Symbols -- LSP Action: List Buffer Symbols
if lsp_client:supports_method('textDocument/documentSymbol') then if lsp_client:supports_method('textDocument/documentSymbol') then
vim.keymap.set('n', '<leader>ls', require('fzf-lua').lsp_document_symbols, vim.keymap.set(
{ buffer = buf, desc = '[L]SP [S]ymbols' }) 'n',
'<leader>ls',
require('fzf-lua').lsp_document_symbols,
{ buffer = buf, desc = '[L]SP [S]ymbols' }
)
end end
end end,
}) })

View File

@ -2,5 +2,5 @@
-- Neovide -- Neovide
if vim.g.neovide then if vim.g.neovide then
require 'guis/neovide' require('guis/neovide')
end end

View File

@ -1,5 +1,5 @@
-- [[ Basic Keymaps ]] -- [[ Basic Keymaps ]]
--- See `:help vim.keymap.set()` --- See `:help vim.keymap.set()`
require 'keymaps/search_hl' require('keymaps/search_hl')
require 'keymaps/split_nav' require('keymaps/split_nav')
require 'keymaps/float_diag' require('keymaps/float_diag')

View File

@ -1,61 +1,35 @@
vim.keymap.set( vim.keymap.set('n', '<leader>ds', function()
'n', vim.diagnostic.open_float()
'<leader>ds', end, { desc = '[D]ebug Float', silent = true })
function()
vim.diagnostic.open_float()
end,
{ desc = '[D]ebug Float', silent = true }
)
vim.keymap.set('n', '[d', function()
vim.diagnostic.jump({
count = -1,
float = not vim.diagnostic.config().virtual_lines,
wrap = false,
})
end, { desc = 'Prev [D]iagnoatic', silent = true })
vim.keymap.set('n', ']d', function()
vim.diagnostic.jump({
count = 1,
float = not vim.diagnostic.config().virtual_lines,
wrap = false,
})
end, { desc = 'Next [D]iagnostic', silent = true })
vim.keymap.set( vim.keymap.set('n', '[e', function()
'n', vim.diagnostic.jump({
'[d', count = -1,
function() float = not vim.diagnostic.config().virtual_lines,
vim.diagnostic.jump({ wrap = false,
count = -1, severity = vim.diagnostic.severity.ERROR,
float = not vim.diagnostic.config().virtual_lines, })
wrap = false, end, { desc = 'Prev [E]rror', silent = true })
}) vim.keymap.set('n', ']e', function()
end, vim.diagnostic.jump({
{ desc = 'Prev [D]iagnoatic', silent = true } count = 1,
) float = not vim.diagnostic.config().virtual_lines,
vim.keymap.set( wrap = false,
'n', severity = vim.diagnostic.severity.ERROR,
']d', })
function() end, { desc = 'Next [E]rror', silent = true })
vim.diagnostic.jump({
count = 1,
float = not vim.diagnostic.config().virtual_lines,
wrap = false,
})
end,
{ desc = 'Next [D]iagnostic', silent = true }
)
vim.keymap.set(
'n',
'[e',
function()
vim.diagnostic.jump({
count = -1,
float = not vim.diagnostic.config().virtual_lines,
wrap = false,
severity = vim.diagnostic.severity.ERROR,
})
end,
{ desc = 'Prev [E]rror', silent = true }
)
vim.keymap.set(
'n',
']e',
function()
vim.diagnostic.jump({
count = 1,
float = not vim.diagnostic.config().virtual_lines,
wrap = false,
severity = vim.diagnostic.severity.ERROR,
})
end,
{ desc = 'Next [E]rror', silent = true }
)

View File

@ -1,17 +1,17 @@
-- Install Lazy -- Install Lazy
--- Update Lazy.nvim by manually deleting 'lazy_path' and restarting nvim --- Update Lazy.nvim by manually deleting 'lazy_path' and restarting nvim
local lazy_repo = "https://github.com/folke/lazy.nvim.git" local lazy_repo = 'https://github.com/folke/lazy.nvim.git'
local lazy_tag = "v11.16.2" local lazy_tag = 'v11.16.2'
local lazy_path = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" local lazy_path = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazy_path) then if not vim.loop.fs_stat(lazy_path) then
vim.fn.system({ vim.fn.system({
"git", 'git',
"clone", 'clone',
"--filter=blob:none", '--filter=blob:none',
lazy_repo, lazy_repo,
"https://github.com/folke/lazy.nvim.git", 'https://github.com/folke/lazy.nvim.git',
"--branch=" .. lazy_tag, '--branch=' .. lazy_tag,
lazy_path, lazy_path,
}) })
end end
@ -31,7 +31,7 @@ require('lazy').setup({
require('plugins/libs/nvim-nio'), require('plugins/libs/nvim-nio'),
--require('plugins/libs/nui'), --require('plugins/libs/nui'),
--require('plugins/libs/nvim-notify'), --require('plugins/libs/nvim-notify'),
require('plugins/libs/image-nvim'), --require('plugins/libs/image-nvim'),
-- TODO: Some kind of image display library. -- TODO: Some kind of image display library.
-- Search: telescope (for now) -- Search: telescope (for now)
@ -75,7 +75,6 @@ require('lazy').setup({
require('plugins/ux/flatten'), require('plugins/ux/flatten'),
-- Workflow -- Workflow
--require('plugins/workflow/neovim-project'),
require('plugins/workflow/projections'), require('plugins/workflow/projections'),
require('plugins/workflow/mini-files'), require('plugins/workflow/mini-files'),
--require('plugins/workflow/git-dev'), --require('plugins/workflow/git-dev'),
@ -152,7 +151,6 @@ require('lazy').setup({
lazy = '💤 ', lazy = '💤 ',
}, },
}, },
}, {
rocks = { rocks = {
hererocks = true, hererocks = true,
}, },

View File

@ -1,10 +1,10 @@
-- Catppuccin Theme -- Catppuccin Theme
--- A soothing pastel theme for neovim. --- A soothing pastel theme for neovim.
return { return {
"catppuccin/nvim", 'catppuccin/nvim',
tag = 'v1.6.0', tag = 'v1.6.0',
name = "catppuccin", name = 'catppuccin',
lazy = false, lazy = false,
priority = 1000, priority = 1000,
@ -12,5 +12,5 @@ return {
config = function() config = function()
vim.cmd('colorscheme catppuccin') vim.cmd('colorscheme catppuccin')
end end,
} }

View File

@ -46,7 +46,9 @@ return {
return 1 -- Something non-nil prevents cmp.show() return 1 -- Something non-nil prevents cmp.show()
end end
end, end,
function(cmp) cmp.show({ providers = { 'snippets' } }) end, function(cmp)
cmp.show({ providers = { 'snippets' } })
end,
}, },
['<C-j>'] = { ['<C-j>'] = {
'select_next', 'select_next',

View File

@ -1,5 +1,5 @@
return { return {
"rafamadriz/friendly-snippets", 'rafamadriz/friendly-snippets',
commit = "efff286dd74c22f731cdec26a70b46e5b203c619", commit = 'efff286dd74c22f731cdec26a70b46e5b203c619',
lazy = false, lazy = false,
} }

View File

@ -1,6 +1,6 @@
return { return {
"mfussenegger/nvim-dap", 'mfussenegger/nvim-dap',
commit = "b4f27d451c187de912fa8d3229025a952917eb9e", commit = 'b4f27d451c187de912fa8d3229025a952917eb9e',
lazy = true, lazy = true,
--dependencies = { --dependencies = {
@ -9,22 +9,124 @@ return {
--}, --},
keys = { keys = {
{ "<leader>dB", function() require("dap").set_breakpoint(vim.fn.input('Breakpoint condition: ')) end, desc = "Breakpoint Condition" }, {
{ "<leader>db", function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" }, '<leader>dB',
{ "<leader>dc", function() require("dap").continue() end, desc = "Run/Continue" }, function()
{ "<leader>da", function() require("dap").continue({ before = get_args }) end, desc = "Run with Args" }, require('dap').set_breakpoint(vim.fn.input('Breakpoint condition: '))
{ "<leader>dC", function() require("dap").run_to_cursor() end, desc = "Run to Cursor" }, end,
{ "<leader>dg", function() require("dap").goto_() end, desc = "Go to Line (No Execute)" }, desc = 'Breakpoint Condition',
{ "<leader>di", function() require("dap").step_into() end, desc = "Step Into" }, },
{ "<leader>dj", function() require("dap").down() end, desc = "Down" }, {
{ "<leader>dk", function() require("dap").up() end, desc = "Up" }, '<leader>db',
{ "<leader>dl", function() require("dap").run_last() end, desc = "Run Last" }, function()
{ "<leader>do", function() require("dap").step_out() end, desc = "Step Out" }, require('dap').toggle_breakpoint()
{ "<leader>dO", function() require("dap").step_over() end, desc = "Step Over" }, end,
{ "<leader>dP", function() require("dap").pause() end, desc = "Pause" }, desc = 'Toggle Breakpoint',
{ "<leader>dr", function() require("dap").repl.toggle() end, desc = "Toggle REPL" }, },
{ "<leader>ds", function() require("dap").session() end, desc = "Session" }, {
{ "<leader>dt", function() require("dap").terminate() end, desc = "Terminate" }, '<leader>dc',
{ "<leader>dw", function() require("dap.ui.widgets").hover() end, desc = "Widgets" }, function()
require('dap').continue()
end,
desc = 'Run/Continue',
},
{
'<leader>da',
function()
require('dap').continue({ before = get_args })
end,
desc = 'Run with Args',
},
{
'<leader>dC',
function()
require('dap').run_to_cursor()
end,
desc = 'Run to Cursor',
},
{
'<leader>dg',
function()
require('dap').goto_()
end,
desc = 'Go to Line (No Execute)',
},
{
'<leader>di',
function()
require('dap').step_into()
end,
desc = 'Step Into',
},
{
'<leader>dj',
function()
require('dap').down()
end,
desc = 'Down',
},
{
'<leader>dk',
function()
require('dap').up()
end,
desc = 'Up',
},
{
'<leader>dl',
function()
require('dap').run_last()
end,
desc = 'Run Last',
},
{
'<leader>do',
function()
require('dap').step_out()
end,
desc = 'Step Out',
},
{
'<leader>dO',
function()
require('dap').step_over()
end,
desc = 'Step Over',
},
{
'<leader>dP',
function()
require('dap').pause()
end,
desc = 'Pause',
},
{
'<leader>dr',
function()
require('dap').repl.toggle()
end,
desc = 'Toggle REPL',
},
{
'<leader>ds',
function()
require('dap').session()
end,
desc = 'Session',
},
{
'<leader>dt',
function()
require('dap').terminate()
end,
desc = 'Terminate',
},
{
'<leader>dw',
function()
require('dap.ui.widgets').hover()
end,
desc = 'Widgets',
},
}, },
} }

View File

@ -1,17 +1,18 @@
return { return {
'stevearc/conform.nvim', 'stevearc/conform.nvim',
commit = "363243c03102a531a8203311d4f2ae704c620d9b", commit = '363243c03102a531a8203311d4f2ae704c620d9b',
lazy = true, lazy = true,
cmd = { "ConformInfo" }, cmd = { 'ConformInfo' },
init = function() init = function()
vim.treesitter.language.register("markdown", { "quarto", "rmd" }) vim.treesitter.language.register('markdown', { 'quarto', 'rmd' })
end, end,
opts = { opts = {
formatters_by_ft = { formatters_by_ft = {
python = { 'ruff_format', 'ruff_organize_imports' }, python = { 'ruff_format', 'ruff_organize_imports' },
lua = { 'stylua' },
--python = { 'ruff_format' }, --python = { 'ruff_format' },
quarto = { 'injected' }, quarto = { 'injected' },
}, },

View File

@ -18,30 +18,30 @@ return {
}, },
}, },
build = ':TSUpdate all', -- Update lang parsers unconditionally on build build = ':TSUpdate all', -- Update lang parsers unconditionally on build
lazy = vim.fn.argc(-1) == 0, -- Load early only when opening file w/cmdline lazy = vim.fn.argc(-1) == 0, -- Load early only when opening file w/cmdline
event = { event = {
'VeryLazy', 'VeryLazy',
}, },
cmd = { cmd = {
"TSUpdateSync", 'TSUpdateSync',
"TSUpdate", 'TSUpdate',
"TSInstall", 'TSInstall',
}, },
init = function(plugin) init = function(plugin)
--- Many plugins apparently no longer require("nvim-treesitter"). --- Many plugins apparently no longer require("nvim-treesitter").
--- This messes with the lazy-loading logic. --- This messes with the lazy-loading logic.
--- However, such plugins only otherwise use custom queries (seems to be called "RTP"). --- However, such plugins only otherwise use custom queries (seems to be called "RTP").
--- We therefore register treesitter w/RTP, so such queries will load treesitter. --- We therefore register treesitter w/RTP, so such queries will load treesitter.
require("lazy.core.loader").add_to_rtp(plugin) require('lazy.core.loader').add_to_rtp(plugin)
require("nvim-treesitter.query_predicates") require('nvim-treesitter.query_predicates')
end, end,
opts = { opts = {
-- Grammer-Aware Syntax Highlighting -- Grammer-Aware Syntax Highlighting
highlight = { highlight = {
enable = true enable = true,
}, },
-- Grammer-Aware Indentation -- Grammer-Aware Indentation
@ -54,193 +54,193 @@ return {
lookahead = false, lookahead = false,
keymaps = { keymaps = {
-- You can use the capture groups defined in textobjects.scm -- You can use the capture groups defined in textobjects.scm
["af"] = { ['af'] = {
query = "@function.outer", query = '@function.outer',
desc = "Select [A]round [F]unction", desc = 'Select [A]round [F]unction',
}, },
["if"] = { ['if'] = {
query = "@function.inner", query = '@function.inner',
desc = "Select [I]nside [F]unction", desc = 'Select [I]nside [F]unction',
}, },
["al"] = { ['al'] = {
query = "@class.outer", query = '@class.outer',
desc = "Select [A]round C[L]ass", desc = 'Select [A]round C[L]ass',
}, },
["il"] = { ['il'] = {
query = "@class.outer", query = '@class.outer',
desc = "Select [I]nside C[L]ass", desc = 'Select [I]nside C[L]ass',
}, },
["ac"] = { ['ac'] = {
query = "@cell.outer", query = '@cell.outer',
desc = "Select [A]round [C]ell", desc = 'Select [A]round [C]ell',
}, },
["ic"] = { ['ic'] = {
query = "@cell.inner", query = '@cell.inner',
desc = "Select [I]nside [C]ell", desc = 'Select [I]nside [C]ell',
}, },
}, },
}, },
move = { move = {
enable = true, enable = true,
set_jumps = true, set_jumps = true,
} },
}, },
-- Always Install Parsers for Languages -- Always Install Parsers for Languages
ensure_installed = { ensure_installed = {
"ada", 'ada',
"arduino", 'arduino',
"asm", 'asm',
"awk", 'awk',
"bash", 'bash',
"bibtex", 'bibtex',
"c", 'c',
"c_sharp", 'c_sharp',
"clojure", 'clojure',
"cmake", 'cmake',
"comment", 'comment',
"commonlisp", 'commonlisp',
"cpp", 'cpp',
"css", 'css',
"csv", 'csv',
"cuda", 'cuda',
"d", 'd',
"dart", 'dart',
"diff", 'diff',
"disassembly", 'disassembly',
"dockerfile", 'dockerfile',
"dot", 'dot',
"doxygen", 'doxygen',
"dtd", 'dtd',
"editorconfig", 'editorconfig',
"eex", 'eex',
"elixir", 'elixir',
"elm", 'elm',
"erlang", 'erlang',
"fennel", 'fennel',
"fish", 'fish',
"forth", 'forth',
"fortran", 'fortran',
"fsh", 'fsh',
"fsharp", 'fsharp',
"gap", 'gap',
"gdscript", 'gdscript',
"gdshader", 'gdshader',
"git_config", 'git_config',
"git_rebase", 'git_rebase',
"gitattributes", 'gitattributes',
"gitcommit", 'gitcommit',
"gitignore", 'gitignore',
"gleam", 'gleam',
"glsl", 'glsl',
"gnuplot", 'gnuplot',
"go", 'go',
"gpg", 'gpg',
"graphql", 'graphql',
"haskell", 'haskell',
"hcl", 'hcl',
"hlsl", 'hlsl',
"hlsplaylist", 'hlsplaylist',
"html", 'html',
"htmldjango", 'htmldjango',
"hyprlang", 'hyprlang',
"ini", 'ini',
"java", 'java',
"javascript", 'javascript',
"jq", 'jq',
"jsdoc", 'jsdoc',
"json", 'json',
"json5", 'json5',
"jsonc", 'jsonc',
"jsonnet", 'jsonnet',
"julia", 'julia',
"just", 'just',
"kconfig", 'kconfig',
"kdl", 'kdl',
"latex", 'latex',
"llvm", 'llvm',
"lua", 'lua',
"luadoc", 'luadoc',
"luap", 'luap',
"luau", 'luau',
"m68k", 'm68k',
"make", 'make',
"markdown", 'markdown',
"markdown_inline", 'markdown_inline',
"matlab", 'matlab',
"meson", 'meson',
"mlir", 'mlir',
"nasm", 'nasm',
"nginx", 'nginx',
"nix", 'nix',
"objc", 'objc',
"objdump", 'objdump',
"ocaml", 'ocaml',
"pascal", 'pascal',
"pem", 'pem',
"perl", 'perl',
"php", 'php',
"phpdoc", 'phpdoc',
"po", 'po',
"pod", 'pod',
"powershell", 'powershell',
"printf", 'printf',
"prisma", 'prisma',
"prolog", 'prolog',
"promql", 'promql',
"proto", 'proto',
"puppet", 'puppet',
"pymanifest", 'pymanifest',
"python", 'python',
"qmldir", 'qmldir',
"qmljs", 'qmljs',
"r", 'r',
"readline", 'readline',
"regex", 'regex',
"requirements", 'requirements',
"robots", 'robots',
"rst", 'rst',
"ruby", 'ruby',
"rust", 'rust',
"scala", 'scala',
"scss", 'scss',
"sflog", 'sflog',
"smithy", 'smithy',
"sql", 'sql',
"ssh_config", 'ssh_config',
"starlark", 'starlark',
"strace", 'strace',
"svelte", 'svelte',
"swift", 'swift',
"t32", 't32',
"tablegen", 'tablegen',
"tcl", 'tcl',
"teal", 'teal',
"terraform", 'terraform',
"tmux", 'tmux',
"todotxt", 'todotxt',
"toml", 'toml',
"tsv", 'tsv',
"tsx", 'tsx',
"turtle", 'turtle',
"typescript", 'typescript',
"typespec", 'typespec',
"typst", 'typst',
"udev", 'udev',
"unison", 'unison',
"usd", 'usd',
"vala", 'vala',
"verilog", 'verilog',
"vim", 'vim',
"vimdoc", 'vimdoc',
"vue", 'vue',
"wgsl", 'wgsl',
"wgsl_bevy", 'wgsl_bevy',
"xml", 'xml',
"xresources", 'xresources',
"yaml", 'yaml',
"zathurarc", 'zathurarc',
"zig", 'zig',
}, },
}, },
config = function(_, opts) config = function(_, opts)
@ -249,5 +249,16 @@ return {
-- Use Treesitter as the Folding Method -- Use Treesitter as the Folding Method
--vim.opt.foldmethod = "expr" --vim.opt.foldmethod = "expr"
--vim.opt.foldexpr = "nvim_treesitter#foldexpr()" --vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
--
require('vim.treesitter.query').set(
'markdown',
'highlights',
[[
;From MDeiml/tree-sitter-markdown
[
(fenced_code_block_delimiter)
] @punctuation.delimiter
]]
)
end, end,
} }

View File

@ -9,32 +9,32 @@ return {
lazy = true, lazy = true,
keys = { keys = {
{ {
"<leader>fml", '<leader>fml',
function() function()
require('cellular-automaton').start_animation('make_it_rain') require('cellular-automaton').start_animation('make_it_rain')
end, end,
"n", 'n',
}, },
{ {
"<leader>fuck", '<leader>fuck',
function() function()
require('cellular-automaton').start_animation('scramble') require('cellular-automaton').start_animation('scramble')
end, end,
"n", 'n',
}, },
{ {
"<leader>fuck", '<leader>fuck',
function() function()
require('cellular-automaton').start_animation('game_of_life') require('cellular-automaton').start_animation('game_of_life')
end, end,
"n", 'n',
}, },
{ {
"<leader>FUCK", '<leader>FUCK',
function() function()
require('cellular-automaton').start_animation('game_of_life') require('cellular-automaton').start_animation('game_of_life')
end, end,
"n", 'n',
}, },
}, },
} }

View File

@ -1,5 +1,5 @@
return { return {
"HakonHarnes/img-clip.nvim", 'HakonHarnes/img-clip.nvim',
commit = '5ded6f468d633ccfb315905fe8901d6c95ae8f29', commit = '5ded6f468d633ccfb315905fe8901d6c95ae8f29',
event = 'VeryLazy', event = 'VeryLazy',

View File

@ -1,11 +1,8 @@
return { return {
'Thiago4532/mdmath.nvim', 'Thiago4532/mdmath.nvim',
commit = '699acb27fd34bfdf92a43ce0abdd17f0c7a948fe', commit = '699acb27fd34bfdf92a43ce0abdd17f0c7a948fe',
opts = {
filetypes = { 'markdown', 'quarto' }, enabled = not vim.g.neovide,
dynamic = true,
dynamic_scale = 0.75,
},
cmd = { cmd = {
'MdMath', 'MdMath',
@ -29,4 +26,10 @@ return {
desc = 'Disable [U]I [E]quations', desc = 'Disable [U]I [E]quations',
}, },
}, },
opts = {
filetypes = { 'markdown', 'quarto' },
dynamic = true,
dynamic_scale = 0.75,
},
} }

View File

@ -1,7 +1,7 @@
return { return {
'benlubas/molten-nvim', 'benlubas/molten-nvim',
commit = "a286aa914d9a154bc359131aab788b5a077a5a99", commit = 'a286aa914d9a154bc359131aab788b5a077a5a99',
build = ":UpdateRemotePlugins", build = ':UpdateRemotePlugins',
lazy = false, lazy = false,
--cmd = { --cmd = {
@ -35,33 +35,36 @@ return {
'<leader>ji', '<leader>ji',
function() function()
vim.ui.input({ vim.ui.input({
prompt = 'Enter Jupyter Server URL:' prompt = 'Enter Jupyter Server URL:',
}, function(input) }, function(input)
if input then if input then
vim.cmd(':MoltenInit ' .. input) vim.cmd(':MoltenInit ' .. input)
end end
end) end)
end, end,
desc = "[J]upyter [I]nitialize", desc = '[J]upyter [I]nitialize',
}, },
{ {
'<leader>jo', '<leader>jo',
':noautocmd MoltenEnterOutput<CR>', ':noautocmd MoltenEnterOutput<CR>',
silent = true, silent = true,
desc = "[J]upyter [I]nitialize" desc = '[J]upyter [I]nitialize',
}, },
{ {
'<leader>jO', '<leader>jO',
':MoltenOpenInBrowser<CR>', ':MoltenOpenInBrowser<CR>',
silent = true, silent = true,
desc = "[J]upyter [I]nitialize" desc = '[J]upyter [I]nitialize',
}, },
}, },
init = function() init = function()
-- Configuration -- Configuration
vim.g.molten_image_provider = "image.nvim" if vim.g.neovide then
vim.g.molten_image_provider = 'image.nvim'
else
vim.g.molten_image_provider = 'none'
end
vim.g.molten_output_win_max_height = 12 vim.g.molten_output_win_max_height = 12
--vim.g.molten_auto_open_output = false --vim.g.molten_auto_open_output = false
vim.g.molten_auto_init_behavior = 'raise' vim.g.molten_auto_init_behavior = 'raise'

View File

@ -12,5 +12,5 @@ return {
mode = { 'i' }, mode = { 'i' },
desc = 'Toggle [U]I [E]quations', desc = 'Toggle [U]I [E]quations',
}, },
} },
} }

View File

@ -1,6 +1,6 @@
return { return {
'jmbuhr/otter.nvim', 'jmbuhr/otter.nvim',
commit = "0e42fa795c35c7190935e3beda3791189c41bb72", commit = '0e42fa795c35c7190935e3beda3791189c41bb72',
lazy = true, lazy = true,
opts = { opts = {

View File

@ -1,7 +1,7 @@
return { return {
--"quarto-dev/quarto-nvim", --"quarto-dev/quarto-nvim",
dir = vim.env.HOME .. '/comps/neovim/quarto-nvim', dir = vim.env.HOME .. '/comps/neovim/quarto-nvim',
commit = "f98937b5be953b27757088e392ce6ccdb16898e5", commit = 'bfc191b2c9f973fd405e703bd0dfe11fb327a149',
lazy = true, lazy = true,
cmd = { cmd = {
@ -23,42 +23,30 @@ return {
{ {
']c', ']c',
function() function()
require('nvim-treesitter.textobjects.move').goto_next_start( require('nvim-treesitter.textobjects.move').goto_next_start('@cell.inner', 'textobjects')
'@cell.inner',
'textobjects'
)
end, end,
desc = "Goto Next [C]ell Start" desc = 'Goto Next [C]ell Start',
}, },
{ {
'[c', '[c',
function() function()
require('nvim-treesitter.textobjects.move').goto_previous_start( require('nvim-treesitter.textobjects.move').goto_previous_start('@cell.inner', 'textobjects')
'@cell.inner',
'textobjects'
)
end, end,
desc = "Goto Prev [C]ell Start" desc = 'Goto Prev [C]ell Start',
}, },
{ {
']C', ']C',
function() function()
require('nvim-treesitter.textobjects.move').goto_next_end( require('nvim-treesitter.textobjects.move').goto_next_end('@cell.outer', 'textobjects')
'@cell.outer',
'textobjects'
)
end, end,
desc = "Goto Next [C]ell End" desc = 'Goto Next [C]ell End',
}, },
{ {
'[C', '[C',
function() function()
require('nvim-treesitter.textobjects.move').goto_previous_end( require('nvim-treesitter.textobjects.move').goto_previous_end('@cell.outer', 'textobjects')
'@cell.outer',
'textobjects'
)
end, end,
desc = "Goto Prev [C]ell End" desc = 'Goto Prev [C]ell End',
}, },
-- Jupyter / Notebooks -- Jupyter / Notebooks
--- <leader>j --- <leader>j
@ -68,7 +56,7 @@ return {
require('quarto.runner').run_cell() require('quarto.runner').run_cell()
--vim.cmd(':noautocmd MoltenEnterOutput') --vim.cmd(':noautocmd MoltenEnterOutput')
end, end,
desc = "[J]upyter Run Ce[L]l", desc = '[J]upyter Run Ce[L]l',
silent = true, silent = true,
}, },
{ {
@ -77,55 +65,61 @@ return {
require('quarto.runner').run_cell() require('quarto.runner').run_cell()
vim.cmd(':MoltenOpenInBrowser') vim.cmd(':MoltenOpenInBrowser')
end, end,
desc = "[J]upyter Run Ce[L]l" desc = '[J]upyter Run Ce[L]l',
}, },
{ {
'<leader>j;', '<leader>j;',
function() function()
require('quarto.runner').run_cell() require('quarto.runner').run_cell()
require('nvim-treesitter.textobjects.move').goto_next_start( require('nvim-treesitter.textobjects.move').goto_next_start('@cell.inner', 'textobjects')
'@cell.inner',
'textobjects'
)
end, end,
desc = "[J]upyter Run Cell and Skip" desc = '[J]upyter Run Cell and Skip',
}, },
{ {
'<leader>jk', '<leader>jk',
function() require('quarto.runner').run_above() end, function()
desc = "[J]upyter Run Cell Above" require('quarto.runner').run_above()
end,
desc = '[J]upyter Run Cell Above',
}, },
{ {
'<leader>jA', '<leader>jA',
function() require('quarto.runner').run_all() end, function()
desc = "[J]upyter Run Cell Below" require('quarto.runner').run_all()
end,
desc = '[J]upyter Run Cell Below',
}, },
{ {
'<leader>j,', '<leader>j,',
function() require('quarto.runner').run_line() end, function()
desc = "[J]upyter Run L[I]ne" require('quarto.runner').run_line()
end,
desc = '[J]upyter Run L[I]ne',
}, },
{ {
'<leader>jp', '<leader>jp',
function() require('quarto').quartoPreview() end, function()
desc = "[J]upyter Start [P]review" require('quarto').quartoPreview()
end,
desc = '[J]upyter Start [P]review',
}, },
{ {
'<leader>jP', '<leader>jP',
function() require('quarto').quartoStopPreview() end, function()
desc = "[J]upyter Stop [P]review" require('quarto').quartoStopPreview()
end,
desc = '[J]upyter Stop [P]review',
}, },
}, },
init = function() init = function()
vim.treesitter.language.register("markdown", { "quarto", "rmd" }) vim.treesitter.language.register('markdown', { 'quarto', 'rmd' })
vim.api.nvim_create_autocmd('FileType', { vim.api.nvim_create_autocmd('FileType', {
pattern = { 'quarto' }, pattern = { 'quarto' },
callback = function(ev) callback = function(ev)
require('quarto').activate() require('quarto').activate()
end end,
}) })
end, end,

View File

@ -8,8 +8,7 @@ return {
file_types = { 'markdown', 'quarto' }, file_types = { 'markdown', 'quarto' },
latex = { enabled = false }, latex = { enabled = false },
win_options = { conceallevel = { rendered = 2 } }, win_options = { conceallevel = { rendered = 2 } },
heading = { heading = {},
},
code = { code = {
position = 'right', position = 'right',
width = 'block', width = 'block',

View File

@ -1,21 +1,22 @@
return { return {
"3rd/image.nvim", '3rd/image.nvim',
commit = "7704e1d03d952393774dc7d00a98d8e127086ba4", commit = '7704e1d03d952393774dc7d00a98d8e127086ba4',
--commit = "301de7919b2c0378cb7a782663f67abbcb198b17",
lazy = false, lazy = false,
enabled = not vim.g.neovide,
cmd = { cmd = {
'ImageReport', 'ImageReport',
}, },
opts = { opts = {
backend = "kitty", backend = 'kitty',
processor = "magick_rock", processor = 'magick_rock',
integrations = { integrations = {
markdown = { markdown = {
only_render_image_at_cursor = true, only_render_image_at_cursor = true,
--floating_windows = true, --floating_windows = true,
filetypes = { "markdown", "quarto" }, filetypes = { 'markdown', 'quarto' },
}, },
}, },
max_width = 100, max_width = 100,
@ -23,6 +24,6 @@ return {
max_height_window_percentage = math.huge, max_height_window_percentage = math.huge,
max_width_window_percentage = math.huge, max_width_window_percentage = math.huge,
window_overlap_clear_enabled = true, window_overlap_clear_enabled = true,
window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "" }, window_overlap_clear_ft_ignore = { 'cmp_menu', 'cmp_docs', '' },
} },
} }

View File

@ -1,5 +1,5 @@
return { return {
'MunifTanjim/nui.nvim', 'MunifTanjim/nui.nvim',
commit = "53e907ffe5eedebdca1cd503b00aa8692068ca46", commit = '53e907ffe5eedebdca1cd503b00aa8692068ca46',
lazy = true, lazy = true,
} }

View File

@ -1,5 +1,5 @@
return { return {
"nvim-neotest/nvim-nio", 'nvim-neotest/nvim-nio',
commit = "21f5324bfac14e22ba26553caf69ec76ae8a7662", commit = '21f5324bfac14e22ba26553caf69ec76ae8a7662',
lazy = true, lazy = true,
} }

View File

@ -1,13 +1,13 @@
local function close_floats() local function close_floats()
for _, win in ipairs(vim.api.nvim_list_wins()) do for _, win in ipairs(vim.api.nvim_list_wins()) do
if vim.api.nvim_win_get_config(win).relative == "win" then if vim.api.nvim_win_get_config(win).relative == 'win' then
vim.api.nvim_win_close(win, false) vim.api.nvim_win_close(win, false)
end end
end end
end end
return { return {
"https://git.sr.ht/~whynothugo/lsp_lines.nvim", 'https://git.sr.ht/~whynothugo/lsp_lines.nvim',
commit = 'a92c755f182b89ea91bd8a6a2227208026f27b4d', commit = 'a92c755f182b89ea91bd8a6a2227208026f27b4d',
lazy = false, lazy = false,
@ -15,7 +15,7 @@ return {
{ {
'<leader>df', '<leader>df',
function() function()
require("lsp_lines").toggle() require('lsp_lines').toggle()
if vim.diagnostic.config().virtual_lines then if vim.diagnostic.config().virtual_lines then
close_floats() close_floats()
@ -40,5 +40,5 @@ return {
--vim.diagnostic.config({ virtual_text = false, virtual_lines = { only_current_line = true }, }) --vim.diagnostic.config({ virtual_text = false, virtual_lines = { only_current_line = true }, })
end, end,
opts = {} opts = {},
} }

View File

@ -1,9 +1,9 @@
-- tiny-code-action -- tiny-code-action
--- Simple code-action visualization with telescope --- Simple code-action visualization with telescope
return { return {
"rachartier/tiny-code-action.nvim", 'rachartier/tiny-code-action.nvim',
lazy = true, lazy = true,
opts = { opts = {
backend = "vim", backend = 'vim',
}, },
} }

View File

@ -13,38 +13,48 @@ return {
lazy = true, lazy = true,
cmd = { cmd = {
"Telescope", 'Telescope',
}, },
keys = { keys = {
-- Accessibility -- Accessibility
{ {
'<leader>s?', '<leader>s?',
function() require('fzf-lua').builtin() end, function()
require('fzf-lua').builtin()
end,
'n', 'n',
desc = '[S]earch Search-Commands', desc = '[S]earch Search-Commands',
}, },
{ {
'<leader>sh', '<leader>sh',
function() require('fzf-lua').helptags() end, function()
require('fzf-lua').helptags()
end,
'n', 'n',
desc = '[S]earch [H]elp Tags', desc = '[S]earch [H]elp Tags',
}, },
{ {
'<leader>sk', '<leader>sk',
function() require('fzf-lua').keymaps() end, function()
require('fzf-lua').keymaps()
end,
'n', 'n',
desc = '[S]earch [K]eymaps', desc = '[S]earch [K]eymaps',
}, },
{ {
'<leader>sc', '<leader>sc',
function() require('fzf-lua').commands() end, function()
require('fzf-lua').commands()
end,
'n', 'n',
desc = '[S]earch [C]ommands', desc = '[S]earch [C]ommands',
}, },
{ {
'<leader>sm', '<leader>sm',
function() require('fzf-lua').manpages() end, function()
require('fzf-lua').manpages()
end,
'n', 'n',
desc = '[S]earch [M]anpages', desc = '[S]earch [M]anpages',
}, },
@ -52,7 +62,9 @@ return {
-- Grep -- Grep
{ {
'<leader>sg', '<leader>sg',
function() require('fzf-lua').live_grep() end, function()
require('fzf-lua').live_grep()
end,
'n', 'n',
desc = '[S]earch w/[G]rep', desc = '[S]earch w/[G]rep',
}, },
@ -60,13 +72,17 @@ return {
-- Buffer / File Search -- Buffer / File Search
{ {
'<leader>sb', '<leader>sb',
function() require('fzf-lua').buffers() end, function()
require('fzf-lua').buffers()
end,
'n', 'n',
desc = '[S]earch [B]uffers', desc = '[S]earch [B]uffers',
}, },
{ {
'<leader>sf', '<leader>sf',
function() require('fzf-lua').files() end, function()
require('fzf-lua').files()
end,
'n', 'n',
desc = '[S]earch [F]iles', desc = '[S]earch [F]iles',
}, },
@ -74,21 +90,27 @@ return {
-- Git: "VCS" -> "v" -- Git: "VCS" -> "v"
{ {
'<leader>sgc', '<leader>sgc',
function() require('fzf-lua').git_commits() end, function()
require('fzf-lua').git_commits()
end,
'n', 'n',
desc = '[S]earch Git [C]ommits', desc = '[S]earch Git [C]ommits',
}, },
{ {
'<leader>sgs', '<leader>sgs',
function() require('fzf-lua').git_status() end, function()
require('fzf-lua').git_status()
end,
'n', 'n',
desc = '[S]earch Git [S]tatus', desc = '[S]earch Git [S]tatus',
}, },
-- Debug -- Debug
{ {
"<leader>sd", '<leader>sd',
function() require('fzf-lua').diagnostics_document() end, function()
require('fzf-lua').diagnostics_document()
end,
'n', 'n',
desc = '[S]earch [D]iagnostics', desc = '[S]earch [D]iagnostics',
}, },
@ -96,7 +118,9 @@ return {
-- Vim -- Vim
{ {
"<leader>s'", "<leader>s'",
function() require('fzf-lua').registers() end, function()
require('fzf-lua').registers()
end,
'n', 'n',
desc = '[S]earch Vim Registers', desc = '[S]earch Vim Registers',
}, },
@ -106,25 +130,25 @@ return {
fzf_bin = 'sk', fzf_bin = 'sk',
keymap = { keymap = {
builtin = { builtin = {
["<c-b>"] = "preview-page-up", ['<c-b>'] = 'preview-page-up',
["<c-f>"] = "preview-page-down", ['<c-f>'] = 'preview-page-down',
}, },
fzf = { fzf = {
["ctrl-u"] = "half-page-up", ['ctrl-u'] = 'half-page-up',
["ctrl-d"] = "half-page-down", ['ctrl-d'] = 'half-page-down',
["ctrl-b"] = "preview-page-up", ['ctrl-b'] = 'preview-page-up',
["ctrl-f"] = "preview-page-down", ['ctrl-f'] = 'preview-page-down',
}, },
}, },
previewers = { previewers = {
builtin = { builtin = {
extensions = { extensions = {
["png"] = { "chafa", "{file}" }, ['png'] = { 'chafa', '{file}' },
["jpg"] = { "chafa", "{file}" }, ['jpg'] = { 'chafa', '{file}' },
["jpeg"] = { "chafa", "{file}" }, ['jpeg'] = { 'chafa', '{file}' },
["gif"] = { "chafa", "{file}" }, ['gif'] = { 'chafa', '{file}' },
["svg"] = { "chafa", "{file}" }, ['svg'] = { 'chafa', '{file}' },
["webp"] = { "chafa", "{file}" }, ['webp'] = { 'chafa', '{file}' },
}, },
}, },
}, },
@ -134,12 +158,12 @@ return {
row = 0.5, row = 0.5,
col = 0.5, col = 0.5,
preview = { preview = {
scrollchars = { "", "" }, scrollchars = { '', '' },
}, },
}, },
fzf_colors = true, fzf_colors = true,
fzf_opts = { fzf_opts = {
["--no-scrollbar"] = true, ['--no-scrollbar'] = true,
}, },
}, },
} }

View File

@ -1,32 +1,40 @@
return { return {
"folke/snacks.nvim", 'folke/snacks.nvim',
commit = "b773368f8aa6e84a68e979f0e335d23de71f405a", commit = 'b773368f8aa6e84a68e979f0e335d23de71f405a',
lazy = false, lazy = false,
priority = 1000, priority = 1000,
keys = { keys = {
{ {
"<c-w>d", '<c-w>d',
function() require('snacks').bufdelete() end, function()
desc = "Delete Current Buffer", require('snacks').bufdelete()
end,
desc = 'Delete Current Buffer',
}, },
-- UX -- UX
--- <leader>u --- <leader>u
{ {
"<leader>ud", '<leader>ud',
function() require('snacks').dim() end, function()
desc = "[U]I [D]imming", require('snacks').dim()
end,
desc = '[U]I [D]imming',
}, },
{ {
"<leader>us", '<leader>us',
function() require('snacks').dim.disable() end, function()
desc = "Disable [U]I Dimming", require('snacks').dim.disable()
end,
desc = 'Disable [U]I Dimming',
}, },
{ {
"<leader>uz", '<leader>uz',
function() require('snacks').zen() end, function()
desc = "[U]I [Z]en Mode", require('snacks').zen()
end,
desc = '[U]I [Z]en Mode',
}, },
}, },
@ -44,7 +52,7 @@ return {
indent = { indent = {
animate = { animate = {
enabled = false, enabled = false,
} },
}, },
-- Input: Better vim.ui.input -- Input: Better vim.ui.input

View File

@ -1,5 +1,5 @@
return { return {
"nvim-neotest/neotest-python", 'nvim-neotest/neotest-python',
commit = "a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e", commit = 'a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e',
lazy = true, lazy = true,
} }

View File

@ -1,29 +1,83 @@
return { return {
"nvim-neotest/neotest", 'nvim-neotest/neotest',
commit = "d66cf4e05a116957f0d3a7755a24291c7d1e1f72", commit = 'd66cf4e05a116957f0d3a7755a24291c7d1e1f72',
lazy = true, lazy = true,
opts = function(_, _) opts = function(_, _)
return { return {
adapters = { adapters = {
require("neotest-python") require('neotest-python'),
}, },
} }
end, end,
keys = { keys = {
{ {
"<leader>t", '<leader>t',
"", '',
desc = "+test" desc = '+test',
},
{
'<leader>tt',
function()
require('neotest').run.run(vim.fn.expand('%'))
end,
desc = 'Run File (Neotest)',
},
{
'<leader>tT',
function()
require('neotest').run.run(vim.uv.cwd())
end,
desc = 'Run All Test Files (Neotest)',
},
{
'<leader>tr',
function()
require('neotest').run.run()
end,
desc = 'Run Nearest (Neotest)',
},
{
'<leader>tl',
function()
require('neotest').run.run_last()
end,
desc = 'Run Last (Neotest)',
},
{
'<leader>ts',
function()
require('neotest').summary.toggle()
end,
desc = 'Toggle Summary (Neotest)',
},
{
'<leader>to',
function()
require('neotest').output.open({ enter = true, auto_close = true })
end,
desc = 'Show Output (Neotest)',
},
{
'<leader>tO',
function()
require('neotest').output_panel.toggle()
end,
desc = 'Toggle Output Panel (Neotest)',
},
{
'<leader>tS',
function()
require('neotest').run.stop()
end,
desc = 'Stop (Neotest)',
},
{
'<leader>tw',
function()
require('neotest').watch.toggle(vim.fn.expand('%'))
end,
desc = 'Toggle Watch (Neotest)',
}, },
{ "<leader>tt", function() require("neotest").run.run(vim.fn.expand("%")) end, desc = "Run File (Neotest)" },
{ "<leader>tT", function() require("neotest").run.run(vim.uv.cwd()) end, desc = "Run All Test Files (Neotest)" },
{ "<leader>tr", function() require("neotest").run.run() end, desc = "Run Nearest (Neotest)" },
{ "<leader>tl", function() require("neotest").run.run_last() end, desc = "Run Last (Neotest)" },
{ "<leader>ts", function() require("neotest").summary.toggle() end, desc = "Toggle Summary (Neotest)" },
{ "<leader>to", function() require("neotest").output.open({ enter = true, auto_close = true }) end, desc = "Show Output (Neotest)" },
{ "<leader>tO", function() require("neotest").output_panel.toggle() end, desc = "Toggle Output Panel (Neotest)" },
{ "<leader>tS", function() require("neotest").run.stop() end, desc = "Stop (Neotest)" },
{ "<leader>tw", function() require("neotest").watch.toggle(vim.fn.expand("%")) end, desc = "Toggle Watch (Neotest)" },
}, },
} }

View File

@ -3,8 +3,8 @@
--- Seriously awesome. Ex. pipe anything into | nvim to open in a new buffer. --- Seriously awesome. Ex. pipe anything into | nvim to open in a new buffer.
--- See https://github.com/willothy/flatten.nvim --- See https://github.com/willothy/flatten.nvim
return { return {
"willothy/flatten.nvim", 'willothy/flatten.nvim',
commit = "b17a3e65c2e4e2ecd1345a2d08435e80f982c4a6", commit = 'b17a3e65c2e4e2ecd1345a2d08435e80f982c4a6',
lazy = false, lazy = false,
priority = 1001, priority = 1001,

View File

@ -1,6 +1,6 @@
return { return {
"folke/noice.nvim", 'folke/noice.nvim',
event = "VeryLazy", event = 'VeryLazy',
opts = { opts = {
cmdline = { enabled = false }, cmdline = { enabled = false },
messages = { enabled = false }, messages = { enabled = false },
@ -10,8 +10,8 @@ return {
lsp = { lsp = {
progress = { enabled = false }, progress = { enabled = false },
override = { override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true, ['vim.lsp.util.convert_input_to_markdown_lines'] = true,
["vim.lsp.util.stylize_markdown"] = true, ['vim.lsp.util.stylize_markdown'] = true,
}, },
hover = { enabled = true }, hover = { enabled = true },
signature = { enabled = true }, signature = { enabled = true },

View File

@ -2,7 +2,7 @@
--- Whenever a key is pressed, display possible key bindings of what is being typed. --- Whenever a key is pressed, display possible key bindings of what is being typed.
--- Automatically reads the desc attribute of custom key bindings. --- Automatically reads the desc attribute of custom key bindings.
return { return {
"folke/which-key.nvim", 'folke/which-key.nvim',
commit = '0e76a87ac51772569aec678dc74baa8e2a86100c', commit = '0e76a87ac51772569aec678dc74baa8e2a86100c',
event = 'VeryLazy', event = 'VeryLazy',
} }

View File

@ -13,99 +13,57 @@ return {
on_attach = function(buf) on_attach = function(buf)
-- Hunk Navigation -- Hunk Navigation
vim.keymap.set( vim.keymap.set('n', ']g', function()
'n', if vim.wo.diff then
']g', vim.cmd.normal({ ']c', bang = true })
function() else
if vim.wo.diff then require('gitsigns').nav_hunk('next')
vim.cmd.normal({ ']c', bang = true }) end
else end, { buffer = buf, desc = 'Next [G]it Change' })
require('gitsigns').nav_hunk('next') vim.keymap.set('n', '[g', function()
end if vim.wo.diff then
end, vim.cmd.normal({ '[c', bang = true })
{ buffer = buf, desc = 'Next [G]it Change' } else
) require('gitsigns').nav_hunk('prev')
vim.keymap.set( end
'n', end, { buffer = buf, desc = 'Prev [G]it Change' })
'[g',
function()
if vim.wo.diff then
vim.cmd.normal({ '[c', bang = true })
else
require('gitsigns').nav_hunk('prev')
end
end,
{ buffer = buf, desc = 'Prev [G]it Change' }
)
-- Hunk Preview -- Hunk Preview
vim.keymap.set( vim.keymap.set('n', '<leader>gp', function()
'n', require('gitsigns').preview_hunk()
'<leader>gp', end, { buffer = buf, desc = '[G]it [P]review Hunk' })
function() require('gitsigns').preview_hunk() end,
{ buffer = buf, desc = '[G]it [P]review Hunk' }
)
-- Buffer Staging / Unstaging -- Buffer Staging / Unstaging
vim.keymap.set( vim.keymap.set('n', '<leader>gs', function()
'n', require('gitsigns').stage_buffer()
'<leader>gs', end, { buffer = buf, desc = '[G]it [S]tage Buffer' })
function() require('gitsigns').stage_buffer() end, vim.keymap.set('n', '<leader>gS', function()
{ buffer = buf, desc = '[G]it [S]tage Buffer' } require('gitsigns').reset_buffer_index()
) end, { buffer = buf, desc = '[G]it Unstage Buffer' })
vim.keymap.set(
'n',
'<leader>gS',
function() require('gitsigns').reset_buffer_index() end,
{ buffer = buf, desc = '[G]it Unstage Buffer' }
)
-- Hunk Staging -- Hunk Staging
vim.keymap.set( vim.keymap.set('n', '<leader>gh', function()
'n', require('gitsigns').stage_hunk()
'<leader>gh', end, { buffer = buf, desc = '[G]it Hunk [S]tage Toggle' })
function() require('gitsigns').stage_hunk() end,
{ buffer = buf, desc = '[G]it Hunk [S]tage Toggle' }
)
-- Restoration -- Restoration
vim.keymap.set( vim.keymap.set('n', '<leader>gr', function()
'n', require('gitsigns').reset_hunk()
'<leader>gr', end, { buffer = buf, desc = '[G]it [R]estore Hunk' })
function() vim.keymap.set('n', '<leader>gR', function()
require('gitsigns').reset_hunk() local choice = vim.fn.confirm('Delete all unstaged changes in this buffer?', '&Yes\n&No', 2)
end, if choice == 1 then
{ buffer = buf, desc = '[G]it [R]estore Hunk' } require('gitsigns').reset_buffer()
) end
vim.keymap.set( end, { buffer = buf, desc = '[G]it [R]estore Buffer' })
'n',
'<leader>gR',
function()
local choice = vim.fn.confirm(
"Delete all unstaged changes in this buffer?",
"&Yes\n&No",
2
)
if choice == 1 then
require('gitsigns').reset_buffer()
end
end,
{ buffer = buf, desc = '[G]it [R]estore Buffer' }
)
vim.keymap.set(
'n',
'<leader>ga',
function()
require('gitsigns').toggle_linehl()
require('gitsigns').toggle_word_diff()
end,
{ buffer = buf, desc = '[G]it [A]nalysis Toggle' }
)
vim.keymap.set('n', '<leader>ga', function()
require('gitsigns').toggle_linehl()
require('gitsigns').toggle_word_diff()
end, { buffer = buf, desc = '[G]it [A]nalysis Toggle' })
-- TODO: Shortcut for opening lazygit in a new :term. -- TODO: Shortcut for opening lazygit in a new :term.
--- Perhaps even in a new tab? --- Perhaps even in a new tab?
end, end,
} },
} }

View File

@ -12,7 +12,7 @@ return {
end end
end, end,
'n', 'n',
desc = '[F]ile Browser' desc = '[F]ile Browser',
}, },
}, },

View File

@ -3,28 +3,28 @@
-- Utilities -- Utilities
return { return {
"coffebar/neovim-project", 'coffebar/neovim-project',
opts = { opts = {
projects = { -- define project roots projects = { -- define project roots
"~/src/*", '~/src/*',
"~/.config/*", '~/.config/*',
}, },
picker = { picker = {
type = "telescope", -- or "fzf-lua" type = 'telescope', -- or "fzf-lua"
} },
}, },
init = function() init = function()
-- enable saving the state of plugins in the session -- enable saving the state of plugins in the session
vim.opt.sessionoptions:append("globals") -- save global variables that start with an uppercase letter and contain at least one lowercase letter. vim.opt.sessionoptions:append('globals') -- save global variables that start with an uppercase letter and contain at least one lowercase letter.
end, end,
dependencies = { dependencies = {
{ "nvim-lua/plenary.nvim" }, { 'nvim-lua/plenary.nvim' },
-- optional picker -- optional picker
{ "nvim-telescope/telescope.nvim", tag = "0.1.4" }, { 'nvim-telescope/telescope.nvim', tag = '0.1.4' },
-- optional picker -- optional picker
{ "ibhagwan/fzf-lua" }, { 'ibhagwan/fzf-lua' },
{ "Shatur/neovim-session-manager" }, { 'Shatur/neovim-session-manager' },
}, },
lazy = false, lazy = false,
priority = 100, priority = 100,
} }

View File

@ -27,11 +27,11 @@ return {
keys = { keys = {
{ {
"<leader>sp", '<leader>sp',
function() function()
require('fzf-lua-p').projects() require('fzf-lua-p').projects()
end, end,
"n", 'n',
}, },
}, },
@ -59,10 +59,12 @@ return {
--#################### --####################
vim.api.nvim_create_autocmd({ 'VimEnter' }, { vim.api.nvim_create_autocmd({ 'VimEnter' }, {
callback = function() callback = function()
local workspaces = require("projections.workspace").get_workspaces() local workspaces = require('projections.workspace').get_workspaces()
local cwd = vim.loop.cwd() local cwd = vim.loop.cwd()
if not cwd then return end if not cwd then
return
end
-- If Currently Within a Project, CD to that Project -- If Currently Within a Project, CD to that Project
for _, ws in ipairs(workspaces) do for _, ws in ipairs(workspaces) do
@ -73,7 +75,9 @@ return {
end end
end end
end end
if not cwd then return end if not cwd then
return
end
-- If Path was Opened: Retrieve That Path -- If Path was Opened: Retrieve That Path
local path_opened_file = nil local path_opened_file = nil
@ -95,7 +99,7 @@ return {
vim.cmd('e ' .. path_opened_file) vim.cmd('e ' .. path_opened_file)
end end
-- TODO: Perhaps we need to question the user a little more about what they want. -- TODO: Perhaps we need to question the user a little more about what they want.
end end,
}) })
end, end,
@ -104,21 +108,21 @@ return {
--- Any folder with a '.git' within a workspace is a 'project'. --- Any folder with a '.git' within a workspace is a 'project'.
workspaces = { workspaces = {
-- General -- General
{ '~/src', { '.git' } }, { '~/src', { '.git' } },
-- Specific -- Specific
--- Blender --- Blender
{ '~/src/blender', { '.git' } }, { '~/src/blender', { '.git' } },
--- College --- College
{ '~/src/college/bsc', { ".active_course" } }, { '~/src/college/bsc', { '.active_course' } },
{ '~/src/college/msc', { ".active_course" } }, { '~/src/college/msc', { '.active_course' } },
--- Infrastructures --- Infrastructures
{ '~/src/infras/clusters', { '.git' } }, { '~/src/infras/clusters', { '.git' } },
--- Photonics --- Photonics
{ '~/src/photonics/books', { '.git' } }, { '~/src/photonics/books', { '.git' } },
{ '~/src/photonics/packages', { '.git' } }, { '~/src/photonics/packages', { '.git' } },
--- Neovim --- Neovim
{ "~/comps/neovim", { '.git' } }, { '~/comps/neovim', { '.git' } },
{ "~/.config", { 'nvim.version' } }, { '~/.config', { 'nvim.version' } },
}, },
}, },
} }