style: ran stylua across entire project
parent
79089250f6
commit
10643d0b4b
2
init.lua
2
init.lua
|
@ -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 ]]
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -16,7 +16,7 @@ return {
|
||||||
vim.env.VIMRUNTIME,
|
vim.env.VIMRUNTIME,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
telemetry = {enable = false},
|
telemetry = { enable = false },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
return {
|
return {
|
||||||
cmd = { 'ruff', 'server' },
|
cmd = { 'ruff', 'server' },
|
||||||
filetypes = { 'python' },
|
filetypes = { 'python' },
|
||||||
root_markers = { "pyproject.toml" },
|
root_markers = { 'pyproject.toml' },
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
return {
|
return {
|
||||||
cmd = { 'rust-analyzer' },
|
cmd = { 'rust-analyzer' },
|
||||||
filetypes = { 'rust' },
|
filetypes = { 'rust' },
|
||||||
root_markers = { "Cargo.toml" },
|
root_markers = { 'Cargo.toml' },
|
||||||
}
|
}
|
||||||
|
|
|
@ -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')
|
||||||
|
|
|
@ -21,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
|
||||||
|
@ -35,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 startswith(lsp_client.name, 'otter-ls') 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?
|
||||||
|
@ -82,18 +69,13 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
if lsp_client:supports_method('textDocument/inlayHint') and not startswith(lsp_client.name, 'otter-ls') 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
|
||||||
|
@ -108,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,
|
||||||
})
|
})
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
|
|
||||||
-- Neovide
|
-- Neovide
|
||||||
if vim.g.neovide then
|
if vim.g.neovide then
|
||||||
require 'guis/neovide'
|
require('guis/neovide')
|
||||||
end
|
end
|
||||||
|
|
|
@ -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')
|
||||||
|
|
|
@ -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 }
|
|
||||||
)
|
|
||||||
|
|
|
@ -91,11 +91,11 @@ require('lazy').setup({
|
||||||
require('plugins/langs/md_quarto/otter'),
|
require('plugins/langs/md_quarto/otter'),
|
||||||
require('plugins/langs/md_quarto/quarto-nvim'),
|
require('plugins/langs/md_quarto/quarto-nvim'),
|
||||||
require('plugins/langs/md_quarto/img-clip'),
|
require('plugins/langs/md_quarto/img-clip'),
|
||||||
--require('plugins/langs/md_quarto/mdmath'),
|
require('plugins/langs/md_quarto/mdmath'),
|
||||||
require('plugins/langs/md_quarto/nabla'),
|
require('plugins/langs/md_quarto/nabla'),
|
||||||
--require('plugins/langs/md_quarto/mkdnflow')
|
--require('plugins/langs/md_quarto/mkdnflow')
|
||||||
--require('plugins/langs/md_quarto/easytables'),
|
--require('plugins/langs/md_quarto/easytables'),
|
||||||
--require('plugins/langs/md_quarto/render-markdown-nvim'),
|
require('plugins/langs/md_quarto/render-markdown-nvim'),
|
||||||
|
|
||||||
-- Lang: Python
|
-- Lang: Python
|
||||||
--require('plugins/langs/python/f-string-toggle'),
|
--require('plugins/langs/python/f-string-toggle'),
|
||||||
|
|
|
@ -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,
|
||||||
}
|
}
|
||||||
|
|
|
@ -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',
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
return {
|
return {
|
||||||
"rafamadriz/friendly-snippets",
|
'rafamadriz/friendly-snippets',
|
||||||
commit = "efff286dd74c22f731cdec26a70b46e5b203c619",
|
commit = 'efff286dd74c22f731cdec26a70b46e5b203c619',
|
||||||
lazy = false,
|
lazy = false,
|
||||||
}
|
}
|
||||||
|
|
|
@ -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',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -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',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
return {
|
return {
|
||||||
"HakonHarnes/img-clip.nvim",
|
'HakonHarnes/img-clip.nvim',
|
||||||
commit = '5ded6f468d633ccfb315905fe8901d6c95ae8f29',
|
commit = '5ded6f468d633ccfb315905fe8901d6c95ae8f29',
|
||||||
event = 'VeryLazy',
|
event = 'VeryLazy',
|
||||||
|
|
||||||
|
|
|
@ -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,36 +35,35 @@ 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
|
||||||
if vim.g.neovide then
|
if vim.g.neovide then
|
||||||
vim.g.molten_image_provider = "image.nvim"
|
vim.g.molten_image_provider = 'image.nvim'
|
||||||
else
|
else
|
||||||
vim.g.molten_image_provider = "none"
|
vim.g.molten_image_provider = 'none'
|
||||||
end
|
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
|
||||||
|
|
|
@ -12,5 +12,5 @@ return {
|
||||||
mode = { 'i' },
|
mode = { 'i' },
|
||||||
desc = 'Toggle [U]I [E]quations',
|
desc = 'Toggle [U]I [E]quations',
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
return {
|
return {
|
||||||
'jmbuhr/otter.nvim',
|
'jmbuhr/otter.nvim',
|
||||||
commit = "0e42fa795c35c7190935e3beda3791189c41bb72",
|
commit = '0e42fa795c35c7190935e3beda3791189c41bb72',
|
||||||
lazy = true,
|
lazy = true,
|
||||||
|
|
||||||
opts = {
|
opts = {
|
||||||
|
|
|
@ -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 = "bfc191b2c9f973fd405e703bd0dfe11fb327a149",
|
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,
|
||||||
|
|
||||||
|
|
|
@ -2,16 +2,13 @@ return {
|
||||||
'MeanderingProgrammer/render-markdown.nvim',
|
'MeanderingProgrammer/render-markdown.nvim',
|
||||||
commit = '17a77463f945c4b9e4f371c752efd90e3e1bf604',
|
commit = '17a77463f945c4b9e4f371c752efd90e3e1bf604',
|
||||||
|
|
||||||
enabled = false,
|
|
||||||
|
|
||||||
ft = { 'markdown', 'quarto' },
|
ft = { 'markdown', 'quarto' },
|
||||||
|
|
||||||
opts = {
|
opts = {
|
||||||
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',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"3rd/image.nvim",
|
'3rd/image.nvim',
|
||||||
commit = "7704e1d03d952393774dc7d00a98d8e127086ba4",
|
commit = '7704e1d03d952393774dc7d00a98d8e127086ba4',
|
||||||
lazy = false,
|
lazy = false,
|
||||||
|
|
||||||
enabled = not vim.g.neovide,
|
enabled = not vim.g.neovide,
|
||||||
|
@ -10,13 +10,13 @@ return {
|
||||||
},
|
},
|
||||||
|
|
||||||
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,
|
||||||
|
@ -24,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', '' },
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
return {
|
return {
|
||||||
'MunifTanjim/nui.nvim',
|
'MunifTanjim/nui.nvim',
|
||||||
commit = "53e907ffe5eedebdca1cd503b00aa8692068ca46",
|
commit = '53e907ffe5eedebdca1cd503b00aa8692068ca46',
|
||||||
lazy = true,
|
lazy = true,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
return {
|
return {
|
||||||
"nvim-neotest/nvim-nio",
|
'nvim-neotest/nvim-nio',
|
||||||
commit = "21f5324bfac14e22ba26553caf69ec76ae8a7662",
|
commit = '21f5324bfac14e22ba26553caf69ec76ae8a7662',
|
||||||
lazy = true,
|
lazy = true,
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 = {},
|
||||||
}
|
}
|
||||||
|
|
|
@ -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',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
return {
|
return {
|
||||||
"nvim-neotest/neotest-python",
|
'nvim-neotest/neotest-python',
|
||||||
commit = "a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e",
|
commit = 'a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e',
|
||||||
lazy = true,
|
lazy = true,
|
||||||
}
|
}
|
||||||
|
|
|
@ -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)" },
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,
|
||||||
|
|
||||||
|
|
|
@ -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 },
|
||||||
|
|
|
@ -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',
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ return {
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
'n',
|
'n',
|
||||||
desc = '[F]ile Browser'
|
desc = '[F]ile Browser',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -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,
|
||||||
}
|
}
|
||||||
|
|
|
@ -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' } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue