3 Commits

Author SHA1 Message Date
377aaf83cf feat: Starting the cleanup on DAP plugins and adding a basic statusline
to futz around with potential replacement of more external plugins.
2026-06-07 14:21:19 -05:00
e6e0ca0cca Merge branch 'main' into development 2026-06-07 14:20:56 -05:00
9f5007cbc3 feat: Adding the new FaultyBranches created note_taking plugin that may
take over for telekasten
2026-06-04 18:31:02 -05:00
14 changed files with 161 additions and 197 deletions

View File

@@ -17,7 +17,6 @@ declare -A configs=(
["nvim/snippets"]="$HOME/.config/nvim/"
["tmux.conf"]="$HOME/.tmux.conf"
["wezterm/wezterm.lua"]="$HOME/.config/wezterm/wezterm.lua"
["gitconfig"]="$HOME/.gitconfig"
)
declare -a config_directories=(

View File

@@ -1,43 +0,0 @@
[push]
default = simple
[core]
autocrlf = input
[filter "lfs"]
clean = git-lfs clean -- %f
process = git-lfs filter-process
required = true
smudge = git-lfs smudge -- %f
[pull]
rebase = false
[init]
defaultBranch = main
[alias]
c = commit
d = diff
dl = diff HEAD^ HEAD
ds = diff --staged
l = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
s = status
branches = branch -avv
staash = stash --all
supdate = submodule update --remote
srupdate = submodule update --recursive
[merge]
tool = nvimdiff
[core]
editor = nvim
[rerere]
enabled = true
[include]
path = ~/.config/git/local
# vim: ft=gitconfig

View File

@@ -3,9 +3,9 @@ return {
pylsp = {
plugins = {
pycodestyle = {
enabled = true,
enabled = false,
ignore = {
'E501' -- line-too-long
'E501'
},
maxLineLength = 120,
},
@@ -13,6 +13,7 @@ return {
enabled = true,
args = {
'--disable=line-too-long',
'--disable=missing-function-docstring'
},
}
}

View File

@@ -10,7 +10,7 @@ end, { nargs = '*' })
vim.api.nvim_create_user_command('TreeSitterInstall', function(opts)
for index, value in ipairs(opts.fargs) do
if index > 0 then
local result = vim.system({ 'luarocks', '--local', '--lua-version', '5.1', 'install', 'tree-sitter-' .. value }, { text = true }):wait()
local result = vim.system({ 'luarocks', 'install', 'tree-sitter-' .. value }, { text = true }):wait()
if result.code == 0 then
print('Completed install of tree-sitter-' .. value)

View File

@@ -1,6 +1,7 @@
-- Load the following plugins eagerly to prevent visual oddities
require('plugins.gruvbox') -- Colorscheme setup
require('plugins.lualine') -- Status line plugin
-- require('statusline')
-- vim.schedule defers plugin loading for after the main loop starts
-- Startup is cleaner and faster than ever
@@ -17,13 +18,15 @@ vim.schedule(function()
require('plugins.render-markdown') -- Render markdown directly in neovim
vim.pack.add({
'https://github.com/windwp/nvim-autopairs', -- Autocomplete symbol pairs when typing
'https://github.com/tpope/vim-surround', -- Change surrounding characters (doesn't need setup called)
'https://github.com/tpope/vim-fugitive', -- _The_ Git integration plugin people have been using forever
'https://github.com/habamax/vim-godot' -- Godot specific bindings and debug
})
require('plugins.dap') -- DAP debugging plugin
require('plugins.dap-python') -- Debug plugin settings specifically for python
require('nvim-autopairs').setup() -- Automatic pair completion of paranteticals, braces, quotes, etc.
require('plugins.dap') -- DAP debugging plugin TODO: cleanup
require('plugins.dap-python') -- Debug plugin settings specifically for python TODO: cleanup
-- Experimental
-- require('plugins.note_taking') -- In house note taking plugin (TODO: rename once the plugin name is solidified)

View File

@@ -5,6 +5,8 @@ vim.pack.add({
'https://github.com/theHamsta/nvim-dap-virtual-text',
})
-- TODO: Needs a pass to remove hardcoding, potentially cut out mason completely and general cleanup
require('dapui').setup({
mappings = {
open = 'o',
@@ -49,90 +51,90 @@ require('dapui').setup({
})
require('nvim-dap-virtual-text').setup()
-- local mason_dap = require('mason-nvim-dap')
local dap, dapui = require('dap'), require('dapui')
-- local mason_dap = require('mason-nvim-dap')
local dap, dapui = require('dap'), require('dapui')
-- mason_dap.setup({
-- ensure_installed = {
-- 'codelldb',
-- 'debugpy',
-- },
-- automatic_installation = true,
-- handlers = {
-- function(config)
-- require('mason-nvim-dap').default_setup(config)
-- end,
-- }
-- })
-- mason_dap.setup({
-- ensure_installed = {
-- 'codelldb',
-- 'debugpy',
-- },
-- automatic_installation = true,
-- handlers = {
-- function(config)
-- require('mason-nvim-dap').default_setup(config)
-- end,
-- }
-- })
dap.listeners.before.attach.dapui_config = function()
dapui.open()
end
dap.listeners.before.launch.dapui_config = function()
dapui.open()
end
dap.listeners.before.event_terminated.dapui_config = function()
dapui.close()
end
dap.listeners.before.event_exited.dapui_config = function()
dapui.close()
end
dap.listeners.before.attach.dapui_config = function()
dapui.open()
end
dap.listeners.before.launch.dapui_config = function()
dapui.open()
end
dap.listeners.before.event_terminated.dapui_config = function()
dapui.close()
end
dap.listeners.before.event_exited.dapui_config = function()
dapui.close()
end
-- vim.fn.sign_define('DapBreakpoint', { text = 'ᛒ', texthl = '', lineh = '', numhl = '' })
vim.fn.sign_define('DapBreakpoint', { text = '🟥', texthl = '', lineh = '', numhl = '' })
vim.fn.sign_define('DapBreakpointCondition', { text = '🝌', texthl = '', lineh = '', numhl = '' })
vim.fn.sign_define('DapStopped', { text = '▶️' })
-- vim.fn.sign_define('DapBreakpoint', { text = 'ᛒ', texthl = '', lineh = '', numhl = '' })
vim.fn.sign_define('DapBreakpoint', { text = '🟥', texthl = '', lineh = '', numhl = '' })
vim.fn.sign_define('DapBreakpointCondition', { text = '🝌', texthl = '', lineh = '', numhl = '' })
vim.fn.sign_define('DapStopped', { text = '▶️' })
dap.adapters.gdb = {
type = 'executable',
command = 'gdb',
args = { '-i', 'dap' },
dap.adapters.gdb = {
type = 'executable',
command = 'gdb',
args = { '-i', 'dap' },
}
dap.adapters.lldb = {
command = 'lldb',
type = 'executable',
}
dap.adapters.debugpy = {
command = 'debugpy',
type = 'executable',
}
dap.configurations = {
rust = {
{
type = 'lldb',
name = 'Debug',
request = 'launch',
program = function()
return vim.fn.getcwd() .. '/target/debug/faultybranches' -- TODO: remove the testing hardcoded path
end,
stopAtBeginningOfMainSubprogram = true,
},
},
python = {
{
type = 'python',
name = 'Launch current file',
request = 'launch',
program = '${file}',
pythonPath = function()
if vim.env.VIRTUAL_ENV then
return vim.env.VIRTUAL_ENV .. '/bin/python'
end
return vim.fn.exepath('python3') or vim.fn.exepath('python') or 'python'
end
}
}
}
dap.adapters.lldb = {
command = 'lldb',
type = 'executable',
}
dap.adapters.debugpy = {
command = 'debugpy',
type = 'executable',
}
dap.configurations = {
rust = {
{
type = 'lldb',
name = 'Debug',
request = 'launch',
program = function()
return vim.fn.getcwd() .. '/target/debug/faultybranches'
end,
stopAtBeginningOfMainSubprogram = true,
},
},
python = {
{
type = 'python',
name = 'Launch current file',
request = 'launch',
program = '${file}',
pythonPath = function()
if vim.env.VIRTUAL_ENV then
return vim.env.VIRTUAL_ENV .. '/bin/python'
end
return vim.fn.exepath('python3') or vim.fn.exepath('python') or 'python'
end
}
}
}
vim.keymap.set('n', '<leader>b', function ()
vim.keymap.set('n', '<leader>b', function()
require('dap').toggle_breakpoint()
end)
vim.keymap.set('n', '<leader>B', function() require('dap').set_breakpoint(vim.fn.input('Breakpoint condition: ')) end)
vim.keymap.set({'n', 'v'}, '<leader>dh', function() require('dap.ui.widgets').hover() end)
vim.keymap.set({ 'n', 'v' }, '<leader>dh', function() require('dap.ui.widgets').hover() end)
vim.keymap.set('n', '<F5>', function() require('dap').continue() end)
vim.keymap.set('n', '<F6>', function() require('dap').run_to_cursor() end)
vim.keymap.set('n', '<F8>', function() require('dap').terminate() end)

View File

@@ -1,7 +1,7 @@
-- Treesitter
local rocks_path = os.getenv('HOME') .. "/.luarocks/lib/luarocks/rocks-5.1"
-- Pick up the installed parsers in the install dir
-- Pick up the installed
for _, parser_dir in ipairs(vim.fn.glob(rocks_path .. '/tree-sitter-*/*/', true, true)) do
vim.opt.runtimepath:prepend(parser_dir)
end

View File

@@ -1,5 +1,5 @@
vim.pack.add({
'https://github.com/saadparwaiz1/cmp_luasnip',
-- 'https://github.com/saadparwaiz1/cmp_luasnip',
'https://github.com/rafamadriz/friendly-snippets',
'https://github.com/L3MON4D3/LuaSnip'
})
@@ -18,8 +18,7 @@ local function luasnip_dependency_update()
if out.code == 0 then
vim.notify('LuaSnip jsregexp built successfully!', vim.log.levels.INFO)
else
vim.notify('Failed to build LuaSnip jsregexp:\n' .. (out.stderr or out.stdout or ''),
vim.log.levels.ERROR)
vim.notify('Failed to build LuaSnip jsregexp:\n' .. (out.stderr or out.stdout or ''), vim.log.levels.ERROR)
end
end)
end)
@@ -43,6 +42,6 @@ require('luasnip.loaders.from_vscode').lazy_load()
require('luasnip.loaders.from_lua').lazy_load({ paths = "./snippets" })
-- TODO: Figure out keymappings that make sense
vim.keymap.set({ 'i' }, '<C-K>', function() require('luasnip').expand() end, { silent = true })
vim.keymap.set({ 'i', 's' }, '<C-L>', function() require('luasnip').jump(1) end, { silent = true })
vim.keymap.set({ 'i', 's' }, '<C-H>', function() require('luasnip').jump(-1) end, { silent = true })
vim.keymap.set({ 'i' }, '<C-k>', function() require('luasnip').expand() end, { silent = true })
vim.keymap.set({ 'i', 's' }, '<C-l>', function() require('luasnip').jump(1) end, { silent = true })
vim.keymap.set({ 'i', 's' }, '<C-j>', function() require('luasnip').jump(-1) end, { silent = true })

View File

@@ -16,6 +16,7 @@ require('mason-lspconfig').setup {
'marksman', -- markdown
'pylsp', -- Python
'rust_analyzer', -- Rust
'ts_ls', -- Typscript
'yamlls', -- YAML
}
}

View File

@@ -0,0 +1,6 @@
vim.pack.add({
-- 'https://git.faultybranches.dev/FaultyBranches_Public/faultynotes.git'
'~/repos/code/faultynotes'
})
require('faultynotes').setup()

26
nvim/lua/statusline.lua Normal file
View File

@@ -0,0 +1,26 @@
local function lsp_status()
local attached_clients = vim.lsp.get_clients({ bufnr = 0 })
if #attached_clients == 0 then
return ''
end
local names = vim.iter(attached_clients)
:map(function (client)
local name = client.name:gsub('language.server', 'ls')
return name
end)
:totable()
return '[' .. table.concat(names, ', ') .. ']'
end
function _G.statusline()
return table.concat({
'%f',
'%h%w%m%r',
'%=',
lsp_status(),
' %-14(%l,%c%V%)',
'%P',
}, ' ')
end
vim.o.statusline = '%{%v:lua._G.statusline()%}'

View File

@@ -1,36 +0,0 @@
-- require('luasnip.session.snippet_collection').clear_snippets('all')
local ls = require('luasnip')
local s = ls.snippet
local sn = ls.snippet_node
local i = ls.insert_node
local t = ls.text_node
local c = ls.choice_node
local r = ls.restore_node
-- Replacement of autopairs
local function pair(pair_begin, pair_end)
-- Auto-pair using snippets
return s({ trig = pair_begin, wordTrig = false }, {
t({ pair_begin }),
c(1, {
r(1, "content", i(1)),
sn(nil, { t({"", "\t"}), r(1, "content", i(1)), t({ "", "" }) }),
}),
t({ pair_end }),
})
end
ls.add_snippets('all', {
pair('(', ')'),
pair('{', '}'),
pair('[', ']'),
pair('<', '>'),
pair("'", "'"),
pair('"', '"'),
pair('`', '`'),
}, {
type = 'autosnippets',
key = 'all_auto',
})
-- end autopairs

View File

@@ -1,36 +1,44 @@
local ls = require('luasnip')
local s = ls.snippet
-- local sn = ls.snippet_node
local i = ls.insert_node
local t = ls.text_node
-- local l = require('luasnip.extras').lambda
local l = require('luasnip.extras').lambda
local fmt = require('luasnip.extras.fmt').fmt
-- local ts_post = require('luasnip.extras.treesitter_postfix').treesitter_postfix
local ts_post = require('luasnip.extras.treesitter_postfix').treesitter_postfix
ls.add_snippets('python', {
s('docstring single', {
t("''' "), i(0, 'text'), t(" '''")
}),
s('def', fmt([[
def {func}({args}) -> {ret}:
''' {doc} '''
{body}
return {
ts_post({
matchTSNode = {
query = [[
(function_definition
parameters: (parameters) @params
return_type: (type) @return
) @prefix
]],
query_lang = "python",
},
trig = "docstring",
}, fmt([[
''' {}
Keyword arguments:
{} () -
Return:
{} - {}
'''
]], {
func = i(1, 'fname'),
args = i(2),
ret = i(3, 'None'),
doc = i(4, 'docstring'),
body = i(5, 'pass'),
}, {
i(1, 'Description'),
l(l.LS_TSCAPTURE_PARAMS),
l(l.LS_TSCAPTURE_RETURN),
l(l.LS_TSDATA),
})),
s('ternary', {
i(1, 'then'), t(' if '), i(2, 'condition'), t(' else '), i(3, 'else')
}),
s('tuple ternary', fmt([[
({if_true}, {if_false})[{condition}]
]], {
if_true = i(1, 'if_true'),
if_false = i(2, 'if_false'),
condition = i(3, 'condition'),
})),
})
-- s(
-- { trig = "thingy" },
-- { t('Woot!') }
-- ),
-- s(
-- { trig = 'thingy2' },
-- { t('Woot2!') }
-- )
}

View File

@@ -53,8 +53,6 @@ if wezterm.target_triple == 'x86_64-unknown-linux-gnu' then
config.xcursor_theme = xcursor_theme
config.xcursor_size = xcursor_size
-- end cursor theme
config.disable_default_key_bindings = true
end
local local_config_filename = os.getenv('HOME') .. '/.config/wezterm/local.lua'