Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# CHANGELOG

## 2025-04-29

## 2025-04-29

- Changed nvim Python LSP from `basedpyright` to disabled by default
- Set shell to `fish` in nvim configuration
- Added ToggleTerm plugin for improved terminal management in nvim

## 2025-03-25

- Switch to LazyVim from kickstarter for nvim config.
Expand All @@ -21,9 +29,6 @@
- Update bash configuration with simplified aliases
- Remove old/unused scripts
- Remove Linux-specific apt packages file

## 2025-03-09

- Replace nvim config with lua version
- Add ghostty config
- Remove iterm config
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
---
version: "3.9"
services:

# Format markdown and yml files.
prettier:
build:
Expand Down
8 changes: 0 additions & 8 deletions gemrc

This file was deleted.

86 changes: 0 additions & 86 deletions lbdbrc

This file was deleted.

8 changes: 7 additions & 1 deletion ncbi/get_species_tax_id.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#!/usr/bin/env python3
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "requests",
# ]
# ///

import requests
from xml.etree import ElementTree as ET
Expand Down
5 changes: 4 additions & 1 deletion nvim/lua/config/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here

vim.g.lazyvim_python_lsp = "basedpyright"
-- Can set this to have type warnings, however this usually creates too much noise
-- vim.g.lazyvim_python_lsp = "basedpyright"

-- Venv for neovim plugins
-- These are managed by ansible in the dotfiles setup
vim.env.PATH = vim.env.PATH .. ":" .. vim.fn.expand("~/.venvs/nvim/bin")

vim.o.shell = "fish"
2 changes: 2 additions & 0 deletions nvim/lua/plugins/disabled.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- disabled lazyvim plugins here
return {}
100 changes: 100 additions & 0 deletions nvim/lua/plugins/toggleterm.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
return {
"akinsho/toggleterm.nvim",
version = "*",
config = function()
local toggleterm = require("toggleterm")

toggleterm.setup({
-- Terminal window size
size = function(term)
if term.direction == "horizontal" then
return 15
elseif term.direction == "vertical" then
return vim.o.columns * 0.4
end
end,

-- Default terminal direction
direction = "horizontal",

-- Terminal window settings
open_mapping = [[<c-\>]], -- Ctrl+\ to toggle terminal
hide_numbers = true, -- Hide line numbers in terminal
shade_filetypes = {},
shade_terminals = true,
shading_factor = 2, -- degree of terminal window shading
start_in_insert = true, -- start terminal in insert mode
insert_mappings = true, -- allow toggling terminal in insert mode
persist_size = true,
close_on_exit = false, -- close terminal when process exits
shell = vim.o.shell, -- use your default shell
})

-- Set up key mappings for terminals
vim.keymap.set("n", "<leader>tt", "<cmd>ToggleTerm<CR>", { desc = "[T]oggle [T]erminal" })
vim.keymap.set("n", "<leader>tf", "<cmd>ToggleTerm direction=float<CR>", { desc = "[T]oggle [F]loating terminal" })
vim.keymap.set(
"n",
"<leader>tv",
"<cmd>ToggleTerm direction=vertical<CR>",
{ desc = "[T]oggle [V]ertical terminal" }
)
vim.keymap.set(
"n",
"<leader>th",
"<cmd>ToggleTerm direction=horizontal<CR>",
{ desc = "[T]oggle [H]orizontal terminal" }
)

-- Send text to terminal
vim.keymap.set("n", "<leader>tl", function()
local term_id = vim.v.count > 0 and vim.v.count or 1

-- Get terminal by ID and toggle it if closed
local term = require("toggleterm.terminal").get(term_id)
if term and not term:is_open() then
term:toggle()
end

-- Send the current line
require("toggleterm").send_lines_to_terminal("single_line", true, { args = term_id })
end, { desc = "[T]erminal send [L]ine" })

vim.keymap.set("v", "<leader>ts", function()
local term_id = vim.v.count > 0 and vim.v.count or 1

-- Get terminal by ID and toggle it if closed
local term = require("toggleterm.terminal").get(term_id)
if term and not term:is_open() then
term:toggle()
end

-- Send the visual selection
require("toggleterm").send_lines_to_terminal("visual_selection", true, { args = term_id })
end, { desc = "[T]erminal [S]end visual selection" })

-- Terminal navigation keymaps
function _G.set_terminal_keymaps()
local opts = { buffer = 0 }
vim.keymap.set("t", "<esc>", [[<C-\><C-n>]], opts)
vim.keymap.set("t", "jk", [[<C-\><C-n>]], opts)
vim.keymap.set("t", "<C-h>", [[<Cmd>wincmd h<CR>]], opts)
vim.keymap.set("t", "<C-j>", [[<Cmd>wincmd j<CR>]], opts)
vim.keymap.set("t", "<C-k>", [[<Cmd>wincmd k<CR>]], opts)
vim.keymap.set("t", "<C-l>", [[<Cmd>wincmd l<CR>]], opts)
vim.keymap.set("t", "<C-w>", [[<C-\><C-n><C-w>]], opts)
end

-- Auto-apply terminal keymaps when opening a terminal
vim.cmd("autocmd! TermOpen term://* lua set_terminal_keymaps()")
end,
keys = {
{ "<c-\\>", desc = "Toggle terminal" },
{ "<leader>tt", desc = "Toggle terminal" },
{ "<leader>tf", desc = "Toggle floating terminal" },
{ "<leader>tv", desc = "Toggle vertical terminal" },
{ "<leader>th", desc = "Toggle horizontal terminal" },
{ "<leader>ts", desc = "Send visual selection to terminal", mode = "v" },
{ "<leader>tl", desc = "Send line to terminal" },
},
}
1 change: 0 additions & 1 deletion octaverc

This file was deleted.

Loading