Compare commits
2 Commits
8cc7b55dab
...
10643d0b4b
Author | SHA1 | Date |
---|---|---|
|
10643d0b4b | |
|
79089250f6 |
|
@ -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
|
|
@ -23,6 +23,7 @@ cargo install --force fd-find
|
|||
cargo install --force bat
|
||||
cargo install --force git-delta
|
||||
cargo install --force skim
|
||||
cargo install --force stylua
|
||||
|
||||
# Python
|
||||
## - FIRST, install uv
|
||||
|
@ -52,3 +53,7 @@ uv init --no-readme --python 3.12 remote-python
|
|||
cd remote-python
|
||||
uv add pynvim jupyter_client requests websocket-client plotly kaleido==0.2.1
|
||||
```
|
||||
|
||||
|
||||
INSTALLATION EXPERIENCES:
|
||||
- need libreadline-dev and libmagickwand-dev
|
||||
|
|
2
init.lua
2
init.lua
|
@ -11,7 +11,7 @@ vim.g.maplocalleader = ' '
|
|||
vim.g.have_nerd_font = true
|
||||
|
||||
-- [[ 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 Options ]]
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
"fzf-lua": { "branch": "main", "commit": "e3fefd97875827e47dc4bbf1074ee464b2d8e6a8" },
|
||||
"fzf-lua-projections.nvim": { "branch": "main", "commit": "411672ab6f7c38d3a4a51916fda1a01c1618ae04" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "9b36d497495436c135659902054ee637e0ba6021" },
|
||||
"hererocks": { "branch": "master", "commit": "c9c5444dea1e07e005484014a8231aa667be30b6" },
|
||||
"image.nvim": { "branch": "master", "commit": "7704e1d03d952393774dc7d00a98d8e127086ba4" },
|
||||
"img-clip.nvim": { "branch": "main", "commit": "5ded6f468d633ccfb315905fe8901d6c95ae8f29" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "f15a93907ddad3d9139aea465ae18336d87f5ce6" },
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
return {
|
||||
cmd = { 'basedpyright-langserver', '--stdio' },
|
||||
filetypes = { 'python' },
|
||||
root_markers = { "pyproject.toml" },
|
||||
root_markers = { 'pyproject.toml' },
|
||||
settings = {
|
||||
basedpyright = {
|
||||
disableOrganizeImports = true,
|
||||
|
|
|
@ -4,6 +4,9 @@ return {
|
|||
root_markers = { '.luarc.json', '.luarc.jsonc' },
|
||||
settings = {
|
||||
Lua = {
|
||||
format = {
|
||||
enable = false,
|
||||
},
|
||||
runtime = {
|
||||
version = 'LuaJIT',
|
||||
},
|
||||
|
@ -13,7 +16,7 @@ return {
|
|||
vim.env.VIMRUNTIME,
|
||||
},
|
||||
},
|
||||
telemetry = {enable = false},
|
||||
telemetry = { enable = false },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
return {
|
||||
cmd = { 'ruff', 'server' },
|
||||
filetypes = { 'python' },
|
||||
root_markers = { "pyproject.toml" },
|
||||
root_markers = { 'pyproject.toml' },
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
return {
|
||||
cmd = { 'rust-analyzer' },
|
||||
filetypes = { 'rust' },
|
||||
root_markers = { "Cargo.toml" },
|
||||
root_markers = { 'Cargo.toml' },
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
-- [[ Autocommands ]]
|
||||
-- See `:help lua-guide-autocommands`
|
||||
|
||||
require 'autocmds/lsp'
|
||||
require 'autocmds/yank_hl'
|
||||
require('autocmds/lsp')
|
||||
require('autocmds/yank_hl')
|
||||
|
|
|
@ -6,6 +6,10 @@ vim.keymap.del('n', 'gri')
|
|||
vim.keymap.del('n', 'gO')
|
||||
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', {
|
||||
callback = function(args)
|
||||
-- See: https://neovim.io/doc/user/lsp.html#lsp-defaults
|
||||
|
@ -17,12 +21,7 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|||
|
||||
-- LSP: Code Completion
|
||||
if lsp_client:supports_method('textDocument/completion') then
|
||||
vim.lsp.completion.enable(
|
||||
true,
|
||||
lsp_client.id,
|
||||
buf,
|
||||
{ autotrigger = false }
|
||||
)
|
||||
vim.lsp.completion.enable(true, lsp_client.id, buf, { autotrigger = false })
|
||||
end
|
||||
|
||||
-- LSP: Diagnostics
|
||||
|
@ -31,32 +30,24 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|||
'n',
|
||||
'<leader>le',
|
||||
require('fzf-lua').diagnostics_document,
|
||||
{ buffer = buf, desc = '[L]SP [E]rrors' })
|
||||
{ buffer = buf, desc = '[L]SP [E]rrors' }
|
||||
)
|
||||
end
|
||||
|
||||
-- LSP: Diagnostics
|
||||
if lsp_client:supports_method('textDocument/signatureHelp') then
|
||||
vim.keymap.set(
|
||||
'i',
|
||||
'<c-s>',
|
||||
vim.lsp.buf.signature_help,
|
||||
{ buffer = buf, desc = 'LSP Signature Help' })
|
||||
vim.keymap.set('i', '<c-s>', vim.lsp.buf.signature_help, { buffer = buf, desc = 'LSP Signature Help' })
|
||||
end
|
||||
|
||||
-- LSP Action: Formatting
|
||||
if lsp_client:supports_method('textDocument/formatting') or lsp_client.name == 'otter-ls[1]' then
|
||||
vim.keymap.set(
|
||||
'n',
|
||||
'<leader>lf',
|
||||
function()
|
||||
require('conform').format({
|
||||
async = true,
|
||||
bufnr = buf,
|
||||
id = lsp_client.id,
|
||||
})
|
||||
end,
|
||||
{ buffer = buf, desc = '[L]SP [F]ormat' }
|
||||
)
|
||||
if lsp_client:supports_method('textDocument/formatting') or startswith(lsp_client.name, 'otter-ls') then
|
||||
vim.keymap.set('n', '<leader>lf', function()
|
||||
require('conform').format({
|
||||
async = true,
|
||||
bufnr = buf,
|
||||
id = lsp_client.id,
|
||||
})
|
||||
end, { buffer = buf, desc = '[L]SP [F]ormat' })
|
||||
|
||||
-- Format the current buffer on save
|
||||
--- TODO: Only on filetypes w/fast formatters?
|
||||
|
@ -75,21 +66,16 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|||
|
||||
-- LSP Action: Inlay Hint
|
||||
--- 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.keymap.set(
|
||||
'n',
|
||||
'<leader>lh',
|
||||
function()
|
||||
if vim.lsp.inlay_hint.is_enabled({ bufnr = buf }) then
|
||||
vim.lsp.inlay_hint.enable(false, { bufnr = buf })
|
||||
else
|
||||
vim.lsp.inlay_hint.enable(true, { bufnr = buf })
|
||||
end
|
||||
end,
|
||||
{ desc = '[L]SP Toggle Inlay [H]ints' }
|
||||
)
|
||||
vim.keymap.set('n', '<leader>lh', function()
|
||||
if vim.lsp.inlay_hint.is_enabled({ bufnr = buf }) then
|
||||
vim.lsp.inlay_hint.enable(false, { bufnr = buf })
|
||||
else
|
||||
vim.lsp.inlay_hint.enable(true, { bufnr = buf })
|
||||
end
|
||||
end, { desc = '[L]SP Toggle Inlay [H]ints' })
|
||||
end
|
||||
|
||||
-- LSP Action: Code Actions
|
||||
|
@ -104,42 +90,31 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|||
|
||||
-- LSP Action: Rename
|
||||
if lsp_client:supports_method('textDocument/rename') then
|
||||
vim.keymap.set(
|
||||
'n',
|
||||
'<leader>lr',
|
||||
vim.lsp.buf.rename,
|
||||
{ buffer = buf, desc = '[L]SP [R]ename' }
|
||||
)
|
||||
vim.keymap.set('n', '<leader>lr', vim.lsp.buf.rename, { buffer = buf, desc = '[L]SP [R]ename' })
|
||||
end
|
||||
|
||||
-- LSP Action: "Hover"
|
||||
if lsp_client:supports_method('textDocument/hover') then
|
||||
vim.keymap.set(
|
||||
'n',
|
||||
'K',
|
||||
vim.lsp.buf.hover,
|
||||
{ buffer = buf, desc = '[L]SP Hover' }
|
||||
)
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, { buffer = buf, desc = '[L]SP Hover' })
|
||||
end
|
||||
|
||||
-- LSP Action: References
|
||||
if (
|
||||
lsp_client:supports_method('textDocument/references')
|
||||
or lsp_client:supports_method('textDocument/typeDefinition')
|
||||
or lsp_client:supports_method('textDocument/definition')
|
||||
) then
|
||||
vim.keymap.set(
|
||||
'n',
|
||||
'<leader>ld',
|
||||
require('fzf-lua').lsp_finder,
|
||||
{ buffer = buf, desc = '[L]SP Fin[D]er' }
|
||||
)
|
||||
if
|
||||
lsp_client:supports_method('textDocument/references')
|
||||
or lsp_client:supports_method('textDocument/typeDefinition')
|
||||
or lsp_client:supports_method('textDocument/definition')
|
||||
then
|
||||
vim.keymap.set('n', '<leader>ld', require('fzf-lua').lsp_finder, { buffer = buf, desc = '[L]SP Fin[D]er' })
|
||||
end
|
||||
|
||||
-- LSP Action: List Buffer Symbols
|
||||
if lsp_client:supports_method('textDocument/documentSymbol') then
|
||||
vim.keymap.set('n', '<leader>ls', require('fzf-lua').lsp_document_symbols,
|
||||
{ buffer = buf, desc = '[L]SP [S]ymbols' })
|
||||
vim.keymap.set(
|
||||
'n',
|
||||
'<leader>ls',
|
||||
require('fzf-lua').lsp_document_symbols,
|
||||
{ buffer = buf, desc = '[L]SP [S]ymbols' }
|
||||
)
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
|
||||
-- Neovide
|
||||
if vim.g.neovide then
|
||||
require 'guis/neovide'
|
||||
require('guis/neovide')
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
-- [[ Basic Keymaps ]]
|
||||
--- See `:help vim.keymap.set()`
|
||||
require 'keymaps/search_hl'
|
||||
require 'keymaps/split_nav'
|
||||
require 'keymaps/float_diag'
|
||||
require('keymaps/search_hl')
|
||||
require('keymaps/split_nav')
|
||||
require('keymaps/float_diag')
|
||||
|
|
|
@ -1,61 +1,35 @@
|
|||
vim.keymap.set(
|
||||
'n',
|
||||
'<leader>ds',
|
||||
function()
|
||||
vim.diagnostic.open_float()
|
||||
end,
|
||||
{ desc = '[D]ebug Float', silent = true }
|
||||
)
|
||||
vim.keymap.set('n', '<leader>ds', 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(
|
||||
'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(
|
||||
'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 }
|
||||
)
|
||||
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 })
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
-- Install Lazy
|
||||
--- Update Lazy.nvim by manually deleting 'lazy_path' and restarting nvim
|
||||
local lazy_repo = "https://github.com/folke/lazy.nvim.git"
|
||||
local lazy_tag = "v11.16.2"
|
||||
local lazy_repo = 'https://github.com/folke/lazy.nvim.git'
|
||||
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
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
'git',
|
||||
'clone',
|
||||
'--filter=blob:none',
|
||||
lazy_repo,
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=" .. lazy_tag,
|
||||
'https://github.com/folke/lazy.nvim.git',
|
||||
'--branch=' .. lazy_tag,
|
||||
lazy_path,
|
||||
})
|
||||
end
|
||||
|
@ -31,7 +31,7 @@ require('lazy').setup({
|
|||
require('plugins/libs/nvim-nio'),
|
||||
--require('plugins/libs/nui'),
|
||||
--require('plugins/libs/nvim-notify'),
|
||||
require('plugins/libs/image-nvim'),
|
||||
--require('plugins/libs/image-nvim'),
|
||||
-- TODO: Some kind of image display library.
|
||||
|
||||
-- Search: telescope (for now)
|
||||
|
@ -75,7 +75,6 @@ require('lazy').setup({
|
|||
require('plugins/ux/flatten'),
|
||||
|
||||
-- Workflow
|
||||
--require('plugins/workflow/neovim-project'),
|
||||
require('plugins/workflow/projections'),
|
||||
require('plugins/workflow/mini-files'),
|
||||
--require('plugins/workflow/git-dev'),
|
||||
|
@ -152,7 +151,6 @@ require('lazy').setup({
|
|||
lazy = '💤 ',
|
||||
},
|
||||
},
|
||||
}, {
|
||||
rocks = {
|
||||
hererocks = true,
|
||||
},
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
-- Catppuccin Theme
|
||||
--- A soothing pastel theme for neovim.
|
||||
return {
|
||||
"catppuccin/nvim",
|
||||
'catppuccin/nvim',
|
||||
tag = 'v1.6.0',
|
||||
|
||||
name = "catppuccin",
|
||||
name = 'catppuccin',
|
||||
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
|
@ -12,5 +12,5 @@ return {
|
|||
|
||||
config = function()
|
||||
vim.cmd('colorscheme catppuccin')
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
|
|
@ -46,7 +46,9 @@ return {
|
|||
return 1 -- Something non-nil prevents cmp.show()
|
||||
end
|
||||
end,
|
||||
function(cmp) cmp.show({ providers = { 'snippets' } }) end,
|
||||
function(cmp)
|
||||
cmp.show({ providers = { 'snippets' } })
|
||||
end,
|
||||
},
|
||||
['<C-j>'] = {
|
||||
'select_next',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
return {
|
||||
"rafamadriz/friendly-snippets",
|
||||
commit = "efff286dd74c22f731cdec26a70b46e5b203c619",
|
||||
'rafamadriz/friendly-snippets',
|
||||
commit = 'efff286dd74c22f731cdec26a70b46e5b203c619',
|
||||
lazy = false,
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
return {
|
||||
"mfussenegger/nvim-dap",
|
||||
commit = "b4f27d451c187de912fa8d3229025a952917eb9e",
|
||||
'mfussenegger/nvim-dap',
|
||||
commit = 'b4f27d451c187de912fa8d3229025a952917eb9e',
|
||||
lazy = true,
|
||||
|
||||
--dependencies = {
|
||||
|
@ -9,22 +9,124 @@ return {
|
|||
--},
|
||||
|
||||
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>dc", 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" },
|
||||
{
|
||||
'<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>dc',
|
||||
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',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
return {
|
||||
'stevearc/conform.nvim',
|
||||
commit = "363243c03102a531a8203311d4f2ae704c620d9b",
|
||||
commit = '363243c03102a531a8203311d4f2ae704c620d9b',
|
||||
lazy = true,
|
||||
|
||||
cmd = { "ConformInfo" },
|
||||
cmd = { 'ConformInfo' },
|
||||
|
||||
init = function()
|
||||
vim.treesitter.language.register("markdown", { "quarto", "rmd" })
|
||||
vim.treesitter.language.register('markdown', { 'quarto', 'rmd' })
|
||||
end,
|
||||
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
python = { 'ruff_format', 'ruff_organize_imports' },
|
||||
lua = { 'stylua' },
|
||||
--python = { 'ruff_format' },
|
||||
quarto = { 'injected' },
|
||||
},
|
||||
|
|
|
@ -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
|
||||
event = {
|
||||
'VeryLazy',
|
||||
},
|
||||
cmd = {
|
||||
"TSUpdateSync",
|
||||
"TSUpdate",
|
||||
"TSInstall",
|
||||
'TSUpdateSync',
|
||||
'TSUpdate',
|
||||
'TSInstall',
|
||||
},
|
||||
init = function(plugin)
|
||||
--- Many plugins apparently no longer require("nvim-treesitter").
|
||||
--- This messes with the lazy-loading logic.
|
||||
--- 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.
|
||||
require("lazy.core.loader").add_to_rtp(plugin)
|
||||
require("nvim-treesitter.query_predicates")
|
||||
require('lazy.core.loader').add_to_rtp(plugin)
|
||||
require('nvim-treesitter.query_predicates')
|
||||
end,
|
||||
|
||||
opts = {
|
||||
-- Grammer-Aware Syntax Highlighting
|
||||
highlight = {
|
||||
enable = true
|
||||
enable = true,
|
||||
},
|
||||
|
||||
-- Grammer-Aware Indentation
|
||||
|
@ -54,193 +54,193 @@ return {
|
|||
lookahead = false,
|
||||
keymaps = {
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
["af"] = {
|
||||
query = "@function.outer",
|
||||
desc = "Select [A]round [F]unction",
|
||||
['af'] = {
|
||||
query = '@function.outer',
|
||||
desc = 'Select [A]round [F]unction',
|
||||
},
|
||||
["if"] = {
|
||||
query = "@function.inner",
|
||||
desc = "Select [I]nside [F]unction",
|
||||
['if'] = {
|
||||
query = '@function.inner',
|
||||
desc = 'Select [I]nside [F]unction',
|
||||
},
|
||||
["al"] = {
|
||||
query = "@class.outer",
|
||||
desc = "Select [A]round C[L]ass",
|
||||
['al'] = {
|
||||
query = '@class.outer',
|
||||
desc = 'Select [A]round C[L]ass',
|
||||
},
|
||||
["il"] = {
|
||||
query = "@class.outer",
|
||||
desc = "Select [I]nside C[L]ass",
|
||||
['il'] = {
|
||||
query = '@class.outer',
|
||||
desc = 'Select [I]nside C[L]ass',
|
||||
},
|
||||
["ac"] = {
|
||||
query = "@cell.outer",
|
||||
desc = "Select [A]round [C]ell",
|
||||
['ac'] = {
|
||||
query = '@cell.outer',
|
||||
desc = 'Select [A]round [C]ell',
|
||||
},
|
||||
["ic"] = {
|
||||
query = "@cell.inner",
|
||||
desc = "Select [I]nside [C]ell",
|
||||
['ic'] = {
|
||||
query = '@cell.inner',
|
||||
desc = 'Select [I]nside [C]ell',
|
||||
},
|
||||
},
|
||||
},
|
||||
move = {
|
||||
enable = true,
|
||||
set_jumps = true,
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
-- Always Install Parsers for Languages
|
||||
ensure_installed = {
|
||||
"ada",
|
||||
"arduino",
|
||||
"asm",
|
||||
"awk",
|
||||
"bash",
|
||||
"bibtex",
|
||||
"c",
|
||||
"c_sharp",
|
||||
"clojure",
|
||||
"cmake",
|
||||
"comment",
|
||||
"commonlisp",
|
||||
"cpp",
|
||||
"css",
|
||||
"csv",
|
||||
"cuda",
|
||||
"d",
|
||||
"dart",
|
||||
"diff",
|
||||
"disassembly",
|
||||
"dockerfile",
|
||||
"dot",
|
||||
"doxygen",
|
||||
"dtd",
|
||||
"editorconfig",
|
||||
"eex",
|
||||
"elixir",
|
||||
"elm",
|
||||
"erlang",
|
||||
"fennel",
|
||||
"fish",
|
||||
"forth",
|
||||
"fortran",
|
||||
"fsh",
|
||||
"fsharp",
|
||||
"gap",
|
||||
"gdscript",
|
||||
"gdshader",
|
||||
"git_config",
|
||||
"git_rebase",
|
||||
"gitattributes",
|
||||
"gitcommit",
|
||||
"gitignore",
|
||||
"gleam",
|
||||
"glsl",
|
||||
"gnuplot",
|
||||
"go",
|
||||
"gpg",
|
||||
"graphql",
|
||||
"haskell",
|
||||
"hcl",
|
||||
"hlsl",
|
||||
"hlsplaylist",
|
||||
"html",
|
||||
"htmldjango",
|
||||
"hyprlang",
|
||||
"ini",
|
||||
"java",
|
||||
"javascript",
|
||||
"jq",
|
||||
"jsdoc",
|
||||
"json",
|
||||
"json5",
|
||||
"jsonc",
|
||||
"jsonnet",
|
||||
"julia",
|
||||
"just",
|
||||
"kconfig",
|
||||
"kdl",
|
||||
"latex",
|
||||
"llvm",
|
||||
"lua",
|
||||
"luadoc",
|
||||
"luap",
|
||||
"luau",
|
||||
"m68k",
|
||||
"make",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"matlab",
|
||||
"meson",
|
||||
"mlir",
|
||||
"nasm",
|
||||
"nginx",
|
||||
"nix",
|
||||
"objc",
|
||||
"objdump",
|
||||
"ocaml",
|
||||
"pascal",
|
||||
"pem",
|
||||
"perl",
|
||||
"php",
|
||||
"phpdoc",
|
||||
"po",
|
||||
"pod",
|
||||
"powershell",
|
||||
"printf",
|
||||
"prisma",
|
||||
"prolog",
|
||||
"promql",
|
||||
"proto",
|
||||
"puppet",
|
||||
"pymanifest",
|
||||
"python",
|
||||
"qmldir",
|
||||
"qmljs",
|
||||
"r",
|
||||
"readline",
|
||||
"regex",
|
||||
"requirements",
|
||||
"robots",
|
||||
"rst",
|
||||
"ruby",
|
||||
"rust",
|
||||
"scala",
|
||||
"scss",
|
||||
"sflog",
|
||||
"smithy",
|
||||
"sql",
|
||||
"ssh_config",
|
||||
"starlark",
|
||||
"strace",
|
||||
"svelte",
|
||||
"swift",
|
||||
"t32",
|
||||
"tablegen",
|
||||
"tcl",
|
||||
"teal",
|
||||
"terraform",
|
||||
"tmux",
|
||||
"todotxt",
|
||||
"toml",
|
||||
"tsv",
|
||||
"tsx",
|
||||
"turtle",
|
||||
"typescript",
|
||||
"typespec",
|
||||
"typst",
|
||||
"udev",
|
||||
"unison",
|
||||
"usd",
|
||||
"vala",
|
||||
"verilog",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"vue",
|
||||
"wgsl",
|
||||
"wgsl_bevy",
|
||||
"xml",
|
||||
"xresources",
|
||||
"yaml",
|
||||
"zathurarc",
|
||||
"zig",
|
||||
'ada',
|
||||
'arduino',
|
||||
'asm',
|
||||
'awk',
|
||||
'bash',
|
||||
'bibtex',
|
||||
'c',
|
||||
'c_sharp',
|
||||
'clojure',
|
||||
'cmake',
|
||||
'comment',
|
||||
'commonlisp',
|
||||
'cpp',
|
||||
'css',
|
||||
'csv',
|
||||
'cuda',
|
||||
'd',
|
||||
'dart',
|
||||
'diff',
|
||||
'disassembly',
|
||||
'dockerfile',
|
||||
'dot',
|
||||
'doxygen',
|
||||
'dtd',
|
||||
'editorconfig',
|
||||
'eex',
|
||||
'elixir',
|
||||
'elm',
|
||||
'erlang',
|
||||
'fennel',
|
||||
'fish',
|
||||
'forth',
|
||||
'fortran',
|
||||
'fsh',
|
||||
'fsharp',
|
||||
'gap',
|
||||
'gdscript',
|
||||
'gdshader',
|
||||
'git_config',
|
||||
'git_rebase',
|
||||
'gitattributes',
|
||||
'gitcommit',
|
||||
'gitignore',
|
||||
'gleam',
|
||||
'glsl',
|
||||
'gnuplot',
|
||||
'go',
|
||||
'gpg',
|
||||
'graphql',
|
||||
'haskell',
|
||||
'hcl',
|
||||
'hlsl',
|
||||
'hlsplaylist',
|
||||
'html',
|
||||
'htmldjango',
|
||||
'hyprlang',
|
||||
'ini',
|
||||
'java',
|
||||
'javascript',
|
||||
'jq',
|
||||
'jsdoc',
|
||||
'json',
|
||||
'json5',
|
||||
'jsonc',
|
||||
'jsonnet',
|
||||
'julia',
|
||||
'just',
|
||||
'kconfig',
|
||||
'kdl',
|
||||
'latex',
|
||||
'llvm',
|
||||
'lua',
|
||||
'luadoc',
|
||||
'luap',
|
||||
'luau',
|
||||
'm68k',
|
||||
'make',
|
||||
'markdown',
|
||||
'markdown_inline',
|
||||
'matlab',
|
||||
'meson',
|
||||
'mlir',
|
||||
'nasm',
|
||||
'nginx',
|
||||
'nix',
|
||||
'objc',
|
||||
'objdump',
|
||||
'ocaml',
|
||||
'pascal',
|
||||
'pem',
|
||||
'perl',
|
||||
'php',
|
||||
'phpdoc',
|
||||
'po',
|
||||
'pod',
|
||||
'powershell',
|
||||
'printf',
|
||||
'prisma',
|
||||
'prolog',
|
||||
'promql',
|
||||
'proto',
|
||||
'puppet',
|
||||
'pymanifest',
|
||||
'python',
|
||||
'qmldir',
|
||||
'qmljs',
|
||||
'r',
|
||||
'readline',
|
||||
'regex',
|
||||
'requirements',
|
||||
'robots',
|
||||
'rst',
|
||||
'ruby',
|
||||
'rust',
|
||||
'scala',
|
||||
'scss',
|
||||
'sflog',
|
||||
'smithy',
|
||||
'sql',
|
||||
'ssh_config',
|
||||
'starlark',
|
||||
'strace',
|
||||
'svelte',
|
||||
'swift',
|
||||
't32',
|
||||
'tablegen',
|
||||
'tcl',
|
||||
'teal',
|
||||
'terraform',
|
||||
'tmux',
|
||||
'todotxt',
|
||||
'toml',
|
||||
'tsv',
|
||||
'tsx',
|
||||
'turtle',
|
||||
'typescript',
|
||||
'typespec',
|
||||
'typst',
|
||||
'udev',
|
||||
'unison',
|
||||
'usd',
|
||||
'vala',
|
||||
'verilog',
|
||||
'vim',
|
||||
'vimdoc',
|
||||
'vue',
|
||||
'wgsl',
|
||||
'wgsl_bevy',
|
||||
'xml',
|
||||
'xresources',
|
||||
'yaml',
|
||||
'zathurarc',
|
||||
'zig',
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
|
@ -249,5 +249,16 @@ return {
|
|||
-- Use Treesitter as the Folding Method
|
||||
--vim.opt.foldmethod = "expr"
|
||||
--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,
|
||||
}
|
||||
|
|
|
@ -9,32 +9,32 @@ return {
|
|||
lazy = true,
|
||||
keys = {
|
||||
{
|
||||
"<leader>fml",
|
||||
'<leader>fml',
|
||||
function()
|
||||
require('cellular-automaton').start_animation('make_it_rain')
|
||||
end,
|
||||
"n",
|
||||
'n',
|
||||
},
|
||||
{
|
||||
"<leader>fuck",
|
||||
'<leader>fuck',
|
||||
function()
|
||||
require('cellular-automaton').start_animation('scramble')
|
||||
end,
|
||||
"n",
|
||||
'n',
|
||||
},
|
||||
{
|
||||
"<leader>fuck",
|
||||
'<leader>fuck',
|
||||
function()
|
||||
require('cellular-automaton').start_animation('game_of_life')
|
||||
end,
|
||||
"n",
|
||||
'n',
|
||||
},
|
||||
{
|
||||
"<leader>FUCK",
|
||||
'<leader>FUCK',
|
||||
function()
|
||||
require('cellular-automaton').start_animation('game_of_life')
|
||||
end,
|
||||
"n",
|
||||
'n',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
return {
|
||||
"HakonHarnes/img-clip.nvim",
|
||||
'HakonHarnes/img-clip.nvim',
|
||||
commit = '5ded6f468d633ccfb315905fe8901d6c95ae8f29',
|
||||
event = 'VeryLazy',
|
||||
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
return {
|
||||
'Thiago4532/mdmath.nvim',
|
||||
commit = '699acb27fd34bfdf92a43ce0abdd17f0c7a948fe',
|
||||
opts = {
|
||||
filetypes = { 'markdown', 'quarto' },
|
||||
dynamic = true,
|
||||
dynamic_scale = 0.75,
|
||||
},
|
||||
|
||||
enabled = not vim.g.neovide,
|
||||
|
||||
cmd = {
|
||||
'MdMath',
|
||||
|
@ -29,4 +26,10 @@ return {
|
|||
desc = 'Disable [U]I [E]quations',
|
||||
},
|
||||
},
|
||||
|
||||
opts = {
|
||||
filetypes = { 'markdown', 'quarto' },
|
||||
dynamic = true,
|
||||
dynamic_scale = 0.75,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
return {
|
||||
'benlubas/molten-nvim',
|
||||
commit = "a286aa914d9a154bc359131aab788b5a077a5a99",
|
||||
build = ":UpdateRemotePlugins",
|
||||
commit = 'a286aa914d9a154bc359131aab788b5a077a5a99',
|
||||
build = ':UpdateRemotePlugins',
|
||||
lazy = false,
|
||||
|
||||
--cmd = {
|
||||
|
@ -35,33 +35,36 @@ return {
|
|||
'<leader>ji',
|
||||
function()
|
||||
vim.ui.input({
|
||||
prompt = 'Enter Jupyter Server URL:'
|
||||
prompt = 'Enter Jupyter Server URL:',
|
||||
}, function(input)
|
||||
if input then
|
||||
vim.cmd(':MoltenInit ' .. input)
|
||||
end
|
||||
end)
|
||||
end,
|
||||
desc = "[J]upyter [I]nitialize",
|
||||
desc = '[J]upyter [I]nitialize',
|
||||
},
|
||||
{
|
||||
'<leader>jo',
|
||||
':noautocmd MoltenEnterOutput<CR>',
|
||||
silent = true,
|
||||
desc = "[J]upyter [I]nitialize"
|
||||
desc = '[J]upyter [I]nitialize',
|
||||
},
|
||||
{
|
||||
'<leader>jO',
|
||||
':MoltenOpenInBrowser<CR>',
|
||||
silent = true,
|
||||
desc = "[J]upyter [I]nitialize"
|
||||
desc = '[J]upyter [I]nitialize',
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
init = function()
|
||||
-- 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_auto_open_output = false
|
||||
vim.g.molten_auto_init_behavior = 'raise'
|
||||
|
|
|
@ -12,5 +12,5 @@ return {
|
|||
mode = { 'i' },
|
||||
desc = 'Toggle [U]I [E]quations',
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
return {
|
||||
'jmbuhr/otter.nvim',
|
||||
commit = "0e42fa795c35c7190935e3beda3791189c41bb72",
|
||||
commit = '0e42fa795c35c7190935e3beda3791189c41bb72',
|
||||
lazy = true,
|
||||
|
||||
opts = {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
return {
|
||||
--"quarto-dev/quarto-nvim",
|
||||
dir = vim.env.HOME .. '/comps/neovim/quarto-nvim',
|
||||
commit = "f98937b5be953b27757088e392ce6ccdb16898e5",
|
||||
commit = 'bfc191b2c9f973fd405e703bd0dfe11fb327a149',
|
||||
lazy = true,
|
||||
|
||||
cmd = {
|
||||
|
@ -23,42 +23,30 @@ return {
|
|||
{
|
||||
']c',
|
||||
function()
|
||||
require('nvim-treesitter.textobjects.move').goto_next_start(
|
||||
'@cell.inner',
|
||||
'textobjects'
|
||||
)
|
||||
require('nvim-treesitter.textobjects.move').goto_next_start('@cell.inner', 'textobjects')
|
||||
end,
|
||||
desc = "Goto Next [C]ell Start"
|
||||
desc = 'Goto Next [C]ell Start',
|
||||
},
|
||||
{
|
||||
'[c',
|
||||
function()
|
||||
require('nvim-treesitter.textobjects.move').goto_previous_start(
|
||||
'@cell.inner',
|
||||
'textobjects'
|
||||
)
|
||||
require('nvim-treesitter.textobjects.move').goto_previous_start('@cell.inner', 'textobjects')
|
||||
end,
|
||||
desc = "Goto Prev [C]ell Start"
|
||||
desc = 'Goto Prev [C]ell Start',
|
||||
},
|
||||
{
|
||||
']C',
|
||||
function()
|
||||
require('nvim-treesitter.textobjects.move').goto_next_end(
|
||||
'@cell.outer',
|
||||
'textobjects'
|
||||
)
|
||||
require('nvim-treesitter.textobjects.move').goto_next_end('@cell.outer', 'textobjects')
|
||||
end,
|
||||
desc = "Goto Next [C]ell End"
|
||||
desc = 'Goto Next [C]ell End',
|
||||
},
|
||||
{
|
||||
'[C',
|
||||
function()
|
||||
require('nvim-treesitter.textobjects.move').goto_previous_end(
|
||||
'@cell.outer',
|
||||
'textobjects'
|
||||
)
|
||||
require('nvim-treesitter.textobjects.move').goto_previous_end('@cell.outer', 'textobjects')
|
||||
end,
|
||||
desc = "Goto Prev [C]ell End"
|
||||
desc = 'Goto Prev [C]ell End',
|
||||
},
|
||||
-- Jupyter / Notebooks
|
||||
--- <leader>j
|
||||
|
@ -68,7 +56,7 @@ return {
|
|||
require('quarto.runner').run_cell()
|
||||
--vim.cmd(':noautocmd MoltenEnterOutput')
|
||||
end,
|
||||
desc = "[J]upyter Run Ce[L]l",
|
||||
desc = '[J]upyter Run Ce[L]l',
|
||||
silent = true,
|
||||
},
|
||||
{
|
||||
|
@ -77,55 +65,61 @@ return {
|
|||
require('quarto.runner').run_cell()
|
||||
vim.cmd(':MoltenOpenInBrowser')
|
||||
end,
|
||||
desc = "[J]upyter Run Ce[L]l"
|
||||
desc = '[J]upyter Run Ce[L]l',
|
||||
},
|
||||
{
|
||||
'<leader>j;',
|
||||
function()
|
||||
require('quarto.runner').run_cell()
|
||||
require('nvim-treesitter.textobjects.move').goto_next_start(
|
||||
'@cell.inner',
|
||||
'textobjects'
|
||||
)
|
||||
require('nvim-treesitter.textobjects.move').goto_next_start('@cell.inner', 'textobjects')
|
||||
end,
|
||||
desc = "[J]upyter Run Cell and Skip"
|
||||
desc = '[J]upyter Run Cell and Skip',
|
||||
},
|
||||
{
|
||||
'<leader>jk',
|
||||
function() require('quarto.runner').run_above() end,
|
||||
desc = "[J]upyter Run Cell Above"
|
||||
function()
|
||||
require('quarto.runner').run_above()
|
||||
end,
|
||||
desc = '[J]upyter Run Cell Above',
|
||||
},
|
||||
{
|
||||
'<leader>jA',
|
||||
function() require('quarto.runner').run_all() end,
|
||||
desc = "[J]upyter Run Cell Below"
|
||||
function()
|
||||
require('quarto.runner').run_all()
|
||||
end,
|
||||
desc = '[J]upyter Run Cell Below',
|
||||
},
|
||||
{
|
||||
'<leader>j,',
|
||||
function() require('quarto.runner').run_line() end,
|
||||
desc = "[J]upyter Run L[I]ne"
|
||||
function()
|
||||
require('quarto.runner').run_line()
|
||||
end,
|
||||
desc = '[J]upyter Run L[I]ne',
|
||||
},
|
||||
{
|
||||
'<leader>jp',
|
||||
function() require('quarto').quartoPreview() end,
|
||||
desc = "[J]upyter Start [P]review"
|
||||
function()
|
||||
require('quarto').quartoPreview()
|
||||
end,
|
||||
desc = '[J]upyter Start [P]review',
|
||||
},
|
||||
{
|
||||
'<leader>jP',
|
||||
function() require('quarto').quartoStopPreview() end,
|
||||
desc = "[J]upyter Stop [P]review"
|
||||
function()
|
||||
require('quarto').quartoStopPreview()
|
||||
end,
|
||||
desc = '[J]upyter Stop [P]review',
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
init = function()
|
||||
vim.treesitter.language.register("markdown", { "quarto", "rmd" })
|
||||
vim.treesitter.language.register('markdown', { 'quarto', 'rmd' })
|
||||
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = { 'quarto' },
|
||||
callback = function(ev)
|
||||
require('quarto').activate()
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
|
||||
|
|
|
@ -8,8 +8,7 @@ return {
|
|||
file_types = { 'markdown', 'quarto' },
|
||||
latex = { enabled = false },
|
||||
win_options = { conceallevel = { rendered = 2 } },
|
||||
heading = {
|
||||
},
|
||||
heading = {},
|
||||
code = {
|
||||
position = 'right',
|
||||
width = 'block',
|
||||
|
|
|
@ -1,21 +1,22 @@
|
|||
return {
|
||||
"3rd/image.nvim",
|
||||
commit = "7704e1d03d952393774dc7d00a98d8e127086ba4",
|
||||
--commit = "301de7919b2c0378cb7a782663f67abbcb198b17",
|
||||
'3rd/image.nvim',
|
||||
commit = '7704e1d03d952393774dc7d00a98d8e127086ba4',
|
||||
lazy = false,
|
||||
|
||||
enabled = not vim.g.neovide,
|
||||
|
||||
cmd = {
|
||||
'ImageReport',
|
||||
},
|
||||
|
||||
opts = {
|
||||
backend = "kitty",
|
||||
processor = "magick_rock",
|
||||
backend = 'kitty',
|
||||
processor = 'magick_rock',
|
||||
integrations = {
|
||||
markdown = {
|
||||
only_render_image_at_cursor = true,
|
||||
--floating_windows = true,
|
||||
filetypes = { "markdown", "quarto" },
|
||||
filetypes = { 'markdown', 'quarto' },
|
||||
},
|
||||
},
|
||||
max_width = 100,
|
||||
|
@ -23,6 +24,6 @@ return {
|
|||
max_height_window_percentage = math.huge,
|
||||
max_width_window_percentage = math.huge,
|
||||
window_overlap_clear_enabled = true,
|
||||
window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "" },
|
||||
}
|
||||
window_overlap_clear_ft_ignore = { 'cmp_menu', 'cmp_docs', '' },
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
return {
|
||||
'MunifTanjim/nui.nvim',
|
||||
commit = "53e907ffe5eedebdca1cd503b00aa8692068ca46",
|
||||
commit = '53e907ffe5eedebdca1cd503b00aa8692068ca46',
|
||||
lazy = true,
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
return {
|
||||
"nvim-neotest/nvim-nio",
|
||||
commit = "21f5324bfac14e22ba26553caf69ec76ae8a7662",
|
||||
'nvim-neotest/nvim-nio',
|
||||
commit = '21f5324bfac14e22ba26553caf69ec76ae8a7662',
|
||||
lazy = true,
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
local function close_floats()
|
||||
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)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
"https://git.sr.ht/~whynothugo/lsp_lines.nvim",
|
||||
'https://git.sr.ht/~whynothugo/lsp_lines.nvim',
|
||||
commit = 'a92c755f182b89ea91bd8a6a2227208026f27b4d',
|
||||
lazy = false,
|
||||
|
||||
|
@ -15,7 +15,7 @@ return {
|
|||
{
|
||||
'<leader>df',
|
||||
function()
|
||||
require("lsp_lines").toggle()
|
||||
require('lsp_lines').toggle()
|
||||
|
||||
if vim.diagnostic.config().virtual_lines then
|
||||
close_floats()
|
||||
|
@ -40,5 +40,5 @@ return {
|
|||
--vim.diagnostic.config({ virtual_text = false, virtual_lines = { only_current_line = true }, })
|
||||
end,
|
||||
|
||||
opts = {}
|
||||
opts = {},
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
-- tiny-code-action
|
||||
--- Simple code-action visualization with telescope
|
||||
return {
|
||||
"rachartier/tiny-code-action.nvim",
|
||||
'rachartier/tiny-code-action.nvim',
|
||||
lazy = true,
|
||||
opts = {
|
||||
backend = "vim",
|
||||
backend = 'vim',
|
||||
},
|
||||
}
|
||||
|
|
|
@ -13,38 +13,48 @@ return {
|
|||
lazy = true,
|
||||
|
||||
cmd = {
|
||||
"Telescope",
|
||||
'Telescope',
|
||||
},
|
||||
|
||||
keys = {
|
||||
-- Accessibility
|
||||
{
|
||||
'<leader>s?',
|
||||
function() require('fzf-lua').builtin() end,
|
||||
function()
|
||||
require('fzf-lua').builtin()
|
||||
end,
|
||||
'n',
|
||||
desc = '[S]earch Search-Commands',
|
||||
},
|
||||
{
|
||||
'<leader>sh',
|
||||
function() require('fzf-lua').helptags() end,
|
||||
function()
|
||||
require('fzf-lua').helptags()
|
||||
end,
|
||||
'n',
|
||||
desc = '[S]earch [H]elp Tags',
|
||||
},
|
||||
{
|
||||
'<leader>sk',
|
||||
function() require('fzf-lua').keymaps() end,
|
||||
function()
|
||||
require('fzf-lua').keymaps()
|
||||
end,
|
||||
'n',
|
||||
desc = '[S]earch [K]eymaps',
|
||||
},
|
||||
{
|
||||
'<leader>sc',
|
||||
function() require('fzf-lua').commands() end,
|
||||
function()
|
||||
require('fzf-lua').commands()
|
||||
end,
|
||||
'n',
|
||||
desc = '[S]earch [C]ommands',
|
||||
},
|
||||
{
|
||||
'<leader>sm',
|
||||
function() require('fzf-lua').manpages() end,
|
||||
function()
|
||||
require('fzf-lua').manpages()
|
||||
end,
|
||||
'n',
|
||||
desc = '[S]earch [M]anpages',
|
||||
},
|
||||
|
@ -52,7 +62,9 @@ return {
|
|||
-- Grep
|
||||
{
|
||||
'<leader>sg',
|
||||
function() require('fzf-lua').live_grep() end,
|
||||
function()
|
||||
require('fzf-lua').live_grep()
|
||||
end,
|
||||
'n',
|
||||
desc = '[S]earch w/[G]rep',
|
||||
},
|
||||
|
@ -60,13 +72,17 @@ return {
|
|||
-- Buffer / File Search
|
||||
{
|
||||
'<leader>sb',
|
||||
function() require('fzf-lua').buffers() end,
|
||||
function()
|
||||
require('fzf-lua').buffers()
|
||||
end,
|
||||
'n',
|
||||
desc = '[S]earch [B]uffers',
|
||||
},
|
||||
{
|
||||
'<leader>sf',
|
||||
function() require('fzf-lua').files() end,
|
||||
function()
|
||||
require('fzf-lua').files()
|
||||
end,
|
||||
'n',
|
||||
desc = '[S]earch [F]iles',
|
||||
},
|
||||
|
@ -74,21 +90,27 @@ return {
|
|||
-- Git: "VCS" -> "v"
|
||||
{
|
||||
'<leader>sgc',
|
||||
function() require('fzf-lua').git_commits() end,
|
||||
function()
|
||||
require('fzf-lua').git_commits()
|
||||
end,
|
||||
'n',
|
||||
desc = '[S]earch Git [C]ommits',
|
||||
},
|
||||
{
|
||||
'<leader>sgs',
|
||||
function() require('fzf-lua').git_status() end,
|
||||
function()
|
||||
require('fzf-lua').git_status()
|
||||
end,
|
||||
'n',
|
||||
desc = '[S]earch Git [S]tatus',
|
||||
},
|
||||
|
||||
-- Debug
|
||||
{
|
||||
"<leader>sd",
|
||||
function() require('fzf-lua').diagnostics_document() end,
|
||||
'<leader>sd',
|
||||
function()
|
||||
require('fzf-lua').diagnostics_document()
|
||||
end,
|
||||
'n',
|
||||
desc = '[S]earch [D]iagnostics',
|
||||
},
|
||||
|
@ -96,7 +118,9 @@ return {
|
|||
-- Vim
|
||||
{
|
||||
"<leader>s'",
|
||||
function() require('fzf-lua').registers() end,
|
||||
function()
|
||||
require('fzf-lua').registers()
|
||||
end,
|
||||
'n',
|
||||
desc = '[S]earch Vim Registers',
|
||||
},
|
||||
|
@ -106,25 +130,25 @@ return {
|
|||
fzf_bin = 'sk',
|
||||
keymap = {
|
||||
builtin = {
|
||||
["<c-b>"] = "preview-page-up",
|
||||
["<c-f>"] = "preview-page-down",
|
||||
['<c-b>'] = 'preview-page-up',
|
||||
['<c-f>'] = 'preview-page-down',
|
||||
},
|
||||
fzf = {
|
||||
["ctrl-u"] = "half-page-up",
|
||||
["ctrl-d"] = "half-page-down",
|
||||
["ctrl-b"] = "preview-page-up",
|
||||
["ctrl-f"] = "preview-page-down",
|
||||
['ctrl-u'] = 'half-page-up',
|
||||
['ctrl-d'] = 'half-page-down',
|
||||
['ctrl-b'] = 'preview-page-up',
|
||||
['ctrl-f'] = 'preview-page-down',
|
||||
},
|
||||
},
|
||||
previewers = {
|
||||
builtin = {
|
||||
extensions = {
|
||||
["png"] = { "chafa", "{file}" },
|
||||
["jpg"] = { "chafa", "{file}" },
|
||||
["jpeg"] = { "chafa", "{file}" },
|
||||
["gif"] = { "chafa", "{file}" },
|
||||
["svg"] = { "chafa", "{file}" },
|
||||
["webp"] = { "chafa", "{file}" },
|
||||
['png'] = { 'chafa', '{file}' },
|
||||
['jpg'] = { 'chafa', '{file}' },
|
||||
['jpeg'] = { 'chafa', '{file}' },
|
||||
['gif'] = { 'chafa', '{file}' },
|
||||
['svg'] = { 'chafa', '{file}' },
|
||||
['webp'] = { 'chafa', '{file}' },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -134,12 +158,12 @@ return {
|
|||
row = 0.5,
|
||||
col = 0.5,
|
||||
preview = {
|
||||
scrollchars = { "┃", "" },
|
||||
scrollchars = { '┃', '' },
|
||||
},
|
||||
},
|
||||
fzf_colors = true,
|
||||
fzf_opts = {
|
||||
["--no-scrollbar"] = true,
|
||||
['--no-scrollbar'] = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,32 +1,40 @@
|
|||
return {
|
||||
"folke/snacks.nvim",
|
||||
commit = "b773368f8aa6e84a68e979f0e335d23de71f405a",
|
||||
'folke/snacks.nvim',
|
||||
commit = 'b773368f8aa6e84a68e979f0e335d23de71f405a',
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
|
||||
keys = {
|
||||
{
|
||||
"<c-w>d",
|
||||
function() require('snacks').bufdelete() end,
|
||||
desc = "Delete Current Buffer",
|
||||
'<c-w>d',
|
||||
function()
|
||||
require('snacks').bufdelete()
|
||||
end,
|
||||
desc = 'Delete Current Buffer',
|
||||
},
|
||||
|
||||
-- UX
|
||||
--- <leader>u
|
||||
{
|
||||
"<leader>ud",
|
||||
function() require('snacks').dim() end,
|
||||
desc = "[U]I [D]imming",
|
||||
'<leader>ud',
|
||||
function()
|
||||
require('snacks').dim()
|
||||
end,
|
||||
desc = '[U]I [D]imming',
|
||||
},
|
||||
{
|
||||
"<leader>us",
|
||||
function() require('snacks').dim.disable() end,
|
||||
desc = "Disable [U]I Dimming",
|
||||
'<leader>us',
|
||||
function()
|
||||
require('snacks').dim.disable()
|
||||
end,
|
||||
desc = 'Disable [U]I Dimming',
|
||||
},
|
||||
{
|
||||
"<leader>uz",
|
||||
function() require('snacks').zen() end,
|
||||
desc = "[U]I [Z]en Mode",
|
||||
'<leader>uz',
|
||||
function()
|
||||
require('snacks').zen()
|
||||
end,
|
||||
desc = '[U]I [Z]en Mode',
|
||||
},
|
||||
},
|
||||
|
||||
|
@ -44,7 +52,7 @@ return {
|
|||
indent = {
|
||||
animate = {
|
||||
enabled = false,
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
-- Input: Better vim.ui.input
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
return {
|
||||
"nvim-neotest/neotest-python",
|
||||
commit = "a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e",
|
||||
'nvim-neotest/neotest-python',
|
||||
commit = 'a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e',
|
||||
lazy = true,
|
||||
}
|
||||
|
|
|
@ -1,29 +1,83 @@
|
|||
return {
|
||||
"nvim-neotest/neotest",
|
||||
commit = "d66cf4e05a116957f0d3a7755a24291c7d1e1f72",
|
||||
'nvim-neotest/neotest',
|
||||
commit = 'd66cf4e05a116957f0d3a7755a24291c7d1e1f72',
|
||||
lazy = true,
|
||||
|
||||
opts = function(_, _)
|
||||
return {
|
||||
adapters = {
|
||||
require("neotest-python")
|
||||
require('neotest-python'),
|
||||
},
|
||||
}
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<leader>t",
|
||||
"",
|
||||
desc = "+test"
|
||||
'<leader>t',
|
||||
'',
|
||||
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)" },
|
||||
},
|
||||
}
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
--- Seriously awesome. Ex. pipe anything into | nvim to open in a new buffer.
|
||||
--- See https://github.com/willothy/flatten.nvim
|
||||
return {
|
||||
"willothy/flatten.nvim",
|
||||
commit = "b17a3e65c2e4e2ecd1345a2d08435e80f982c4a6",
|
||||
'willothy/flatten.nvim',
|
||||
commit = 'b17a3e65c2e4e2ecd1345a2d08435e80f982c4a6',
|
||||
lazy = false,
|
||||
priority = 1001,
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
return {
|
||||
"folke/noice.nvim",
|
||||
event = "VeryLazy",
|
||||
'folke/noice.nvim',
|
||||
event = 'VeryLazy',
|
||||
opts = {
|
||||
cmdline = { enabled = false },
|
||||
messages = { enabled = false },
|
||||
|
@ -10,8 +10,8 @@ return {
|
|||
lsp = {
|
||||
progress = { enabled = false },
|
||||
override = {
|
||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||
["vim.lsp.util.stylize_markdown"] = true,
|
||||
['vim.lsp.util.convert_input_to_markdown_lines'] = true,
|
||||
['vim.lsp.util.stylize_markdown'] = true,
|
||||
},
|
||||
hover = { enabled = true },
|
||||
signature = { enabled = true },
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
--- Whenever a key is pressed, display possible key bindings of what is being typed.
|
||||
--- Automatically reads the desc attribute of custom key bindings.
|
||||
return {
|
||||
"folke/which-key.nvim",
|
||||
'folke/which-key.nvim',
|
||||
commit = '0e76a87ac51772569aec678dc74baa8e2a86100c',
|
||||
event = 'VeryLazy',
|
||||
}
|
||||
|
|
|
@ -13,99 +13,57 @@ return {
|
|||
|
||||
on_attach = function(buf)
|
||||
-- Hunk Navigation
|
||||
vim.keymap.set(
|
||||
'n',
|
||||
']g',
|
||||
function()
|
||||
if vim.wo.diff then
|
||||
vim.cmd.normal({ ']c', bang = true })
|
||||
else
|
||||
require('gitsigns').nav_hunk('next')
|
||||
end
|
||||
end,
|
||||
{ buffer = buf, desc = 'Next [G]it Change' }
|
||||
)
|
||||
vim.keymap.set(
|
||||
'n',
|
||||
'[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' }
|
||||
)
|
||||
vim.keymap.set('n', ']g', function()
|
||||
if vim.wo.diff then
|
||||
vim.cmd.normal({ ']c', bang = true })
|
||||
else
|
||||
require('gitsigns').nav_hunk('next')
|
||||
end
|
||||
end, { buffer = buf, desc = 'Next [G]it Change' })
|
||||
vim.keymap.set('n', '[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
|
||||
vim.keymap.set(
|
||||
'n',
|
||||
'<leader>gp',
|
||||
function() require('gitsigns').preview_hunk() end,
|
||||
{ buffer = buf, desc = '[G]it [P]review Hunk' }
|
||||
)
|
||||
vim.keymap.set('n', '<leader>gp', function()
|
||||
require('gitsigns').preview_hunk()
|
||||
end, { buffer = buf, desc = '[G]it [P]review Hunk' })
|
||||
|
||||
-- Buffer Staging / Unstaging
|
||||
vim.keymap.set(
|
||||
'n',
|
||||
'<leader>gs',
|
||||
function() require('gitsigns').stage_buffer() end,
|
||||
{ buffer = buf, desc = '[G]it [S]tage Buffer' }
|
||||
)
|
||||
vim.keymap.set(
|
||||
'n',
|
||||
'<leader>gS',
|
||||
function() require('gitsigns').reset_buffer_index() end,
|
||||
{ buffer = buf, desc = '[G]it Unstage Buffer' }
|
||||
)
|
||||
vim.keymap.set('n', '<leader>gs', function()
|
||||
require('gitsigns').stage_buffer()
|
||||
end, { buffer = buf, desc = '[G]it [S]tage Buffer' })
|
||||
vim.keymap.set('n', '<leader>gS', function()
|
||||
require('gitsigns').reset_buffer_index()
|
||||
end, { buffer = buf, desc = '[G]it Unstage Buffer' })
|
||||
|
||||
-- Hunk Staging
|
||||
vim.keymap.set(
|
||||
'n',
|
||||
'<leader>gh',
|
||||
function() require('gitsigns').stage_hunk() end,
|
||||
{ buffer = buf, desc = '[G]it Hunk [S]tage Toggle' }
|
||||
)
|
||||
vim.keymap.set('n', '<leader>gh', function()
|
||||
require('gitsigns').stage_hunk()
|
||||
end, { buffer = buf, desc = '[G]it Hunk [S]tage Toggle' })
|
||||
|
||||
-- Restoration
|
||||
vim.keymap.set(
|
||||
'n',
|
||||
'<leader>gr',
|
||||
function()
|
||||
require('gitsigns').reset_hunk()
|
||||
end,
|
||||
{ buffer = buf, desc = '[G]it [R]estore Hunk' }
|
||||
)
|
||||
vim.keymap.set(
|
||||
'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>gr', function()
|
||||
require('gitsigns').reset_hunk()
|
||||
end, { buffer = buf, desc = '[G]it [R]estore Hunk' })
|
||||
vim.keymap.set('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' })
|
||||
|
||||
-- TODO: Shortcut for opening lazygit in a new :term.
|
||||
--- Perhaps even in a new tab?
|
||||
end,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ return {
|
|||
end
|
||||
end,
|
||||
'n',
|
||||
desc = '[F]ile Browser'
|
||||
desc = '[F]ile Browser',
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
@ -3,28 +3,28 @@
|
|||
|
||||
-- Utilities
|
||||
return {
|
||||
"coffebar/neovim-project",
|
||||
opts = {
|
||||
projects = { -- define project roots
|
||||
"~/src/*",
|
||||
"~/.config/*",
|
||||
},
|
||||
picker = {
|
||||
type = "telescope", -- or "fzf-lua"
|
||||
}
|
||||
},
|
||||
init = function()
|
||||
-- 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.
|
||||
end,
|
||||
dependencies = {
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
-- optional picker
|
||||
{ "nvim-telescope/telescope.nvim", tag = "0.1.4" },
|
||||
-- optional picker
|
||||
{ "ibhagwan/fzf-lua" },
|
||||
{ "Shatur/neovim-session-manager" },
|
||||
},
|
||||
lazy = false,
|
||||
priority = 100,
|
||||
'coffebar/neovim-project',
|
||||
opts = {
|
||||
projects = { -- define project roots
|
||||
'~/src/*',
|
||||
'~/.config/*',
|
||||
},
|
||||
picker = {
|
||||
type = 'telescope', -- or "fzf-lua"
|
||||
},
|
||||
},
|
||||
init = function()
|
||||
-- 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.
|
||||
end,
|
||||
dependencies = {
|
||||
{ 'nvim-lua/plenary.nvim' },
|
||||
-- optional picker
|
||||
{ 'nvim-telescope/telescope.nvim', tag = '0.1.4' },
|
||||
-- optional picker
|
||||
{ 'ibhagwan/fzf-lua' },
|
||||
{ 'Shatur/neovim-session-manager' },
|
||||
},
|
||||
lazy = false,
|
||||
priority = 100,
|
||||
}
|
||||
|
|
|
@ -27,11 +27,11 @@ return {
|
|||
|
||||
keys = {
|
||||
{
|
||||
"<leader>sp",
|
||||
'<leader>sp',
|
||||
function()
|
||||
require('fzf-lua-p').projects()
|
||||
end,
|
||||
"n",
|
||||
'n',
|
||||
},
|
||||
},
|
||||
|
||||
|
@ -59,10 +59,12 @@ return {
|
|||
--####################
|
||||
vim.api.nvim_create_autocmd({ 'VimEnter' }, {
|
||||
callback = function()
|
||||
local workspaces = require("projections.workspace").get_workspaces()
|
||||
local workspaces = require('projections.workspace').get_workspaces()
|
||||
|
||||
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
|
||||
for _, ws in ipairs(workspaces) do
|
||||
|
@ -73,7 +75,9 @@ return {
|
|||
end
|
||||
end
|
||||
end
|
||||
if not cwd then return end
|
||||
if not cwd then
|
||||
return
|
||||
end
|
||||
|
||||
-- If Path was Opened: Retrieve That Path
|
||||
local path_opened_file = nil
|
||||
|
@ -95,7 +99,7 @@ return {
|
|||
vim.cmd('e ' .. path_opened_file)
|
||||
end
|
||||
-- TODO: Perhaps we need to question the user a little more about what they want.
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
|
||||
|
@ -104,21 +108,21 @@ return {
|
|||
--- Any folder with a '.git' within a workspace is a 'project'.
|
||||
workspaces = {
|
||||
-- General
|
||||
{ '~/src', { '.git' } },
|
||||
{ '~/src', { '.git' } },
|
||||
-- Specific
|
||||
--- Blender
|
||||
{ '~/src/blender', { '.git' } },
|
||||
{ '~/src/blender', { '.git' } },
|
||||
--- College
|
||||
{ '~/src/college/bsc', { ".active_course" } },
|
||||
{ '~/src/college/msc', { ".active_course" } },
|
||||
{ '~/src/college/bsc', { '.active_course' } },
|
||||
{ '~/src/college/msc', { '.active_course' } },
|
||||
--- Infrastructures
|
||||
{ '~/src/infras/clusters', { '.git' } },
|
||||
{ '~/src/infras/clusters', { '.git' } },
|
||||
--- Photonics
|
||||
{ '~/src/photonics/books', { '.git' } },
|
||||
{ '~/src/photonics/books', { '.git' } },
|
||||
{ '~/src/photonics/packages', { '.git' } },
|
||||
--- Neovim
|
||||
{ "~/comps/neovim", { '.git' } },
|
||||
{ "~/.config", { 'nvim.version' } },
|
||||
{ '~/comps/neovim', { '.git' } },
|
||||
{ '~/.config', { 'nvim.version' } },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue