-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
462 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,35 @@ | ||
# TODO | ||
|
||
- add snippet engine back | ||
- code format uses two spaces | ||
- sessions | ||
- ts-comment | ||
- edgy ide setup | ||
- add rust tools back | ||
|
||
--- | ||
|
||
seperate repo for dotfiles (remove bare git repo) | ||
nvim comments https://github.com/folke/ts-comments.nvim | ||
|
||
neotest | ||
update plugins | ||
yank color | ||
syntax groups flash when loading files | ||
|
||
emmet plugin | ||
elixir inlay hints | ||
gx vim.ui.open() | ||
|
||
switch to default nvim keymaps | ||
|
||
indent text object | ||
noice popupmenu background | ||
|
||
## Plugins | ||
|
||
- keymaps https://www.lazyvim.org/keymaps#general | ||
- https://github.com/LazyVim/LazyVim/blob/a50f92f7550fb6e9f21c0852e6cb190e6fcd50f5/lua/lazyvim/config/autocmds.lua#L53-L76 | ||
- https://github.com/folke/neoconf.nvim | ||
- https://github.com/mfussenegger/nvim-dap | ||
- copilot <CR> when trying to add parens/brackets | ||
- https://github.com/neovim/nvim-lspconfig/#suggested-configuration | ||
|
||
- https://github.com/folke/persistence.nvim | ||
- https://github.com/goolord/alpha-nvim | ||
- https://github.com/andymass/vim-matchup | ||
- https://github.com/folke/edgy.nvim | ||
|
||
- LSP set up https://github.com/LazyVim/LazyVim/blob/8c0e39c826f697d668aae336ea26a83be806a543/lua/lazyvim/plugins/lsp/init.lua#L90 | ||
- trouble quickfix https://github.com/LazyVim/LazyVim/blob/0801e52118ef5f48d4ae389d0cefd79814d28a42/lua/lazyvim/plugins/editor.lua#L415 | ||
- https://github.com/folke/persistence.nvim (nvim-lastplace captured by persist?) | ||
- https://github.com/nvimdev/dashboard-nvim | ||
- https://github.com/folke/todo-comments.nvim | ||
- https://github.com/yetone/avante.nvim | ||
- https://github.com/nvim-treesitter/nvim-treesitter-textobjects | ||
- https://github.com/mfussenegger/nvim-lint | ||
- emmet plugin | ||
|
||
## Misc | ||
|
||
- swap unimpaired mappings https://twitter.com/elijahmanor/status/1615927039529291776 | ||
- trouble in lualine | ||
- add rust tools back | ||
- elixir inlay hints | ||
|
||
- .files show up in telescope (e.g. `.env`) | ||
- separate repo for dotfiles (remove bare git repo) | ||
|
||
## Issues | ||
|
||
- edgy terminal background color | ||
- syntax groups flash when loading files | ||
- icon size changes/missing icons in cmp | ||
- neotest output does not auto-scroll in edgy | ||
|
||
## Links | ||
|
||
- https://www.lazyvim.org | ||
- https://github.com/folke/dot | ||
- https://gist.github.com/rsms/fb463396c95ad8d9efa338a8050a01dc | ||
|
||
- https://nix-community.github.io/home-manager/options.html | ||
- https://daiderd.com/nix-darwin/manual/index.html | ||
- https://search.nixos.org/packages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
---@class util.terminal | ||
---@overload fun(cmd: string|string[], opts: TermOpts): Float | ||
local M = setmetatable({}, { | ||
__call = function(m, ...) | ||
return m.open(...) | ||
end, | ||
}) | ||
|
||
---@type table<string,Float> | ||
local terminals = {} | ||
|
||
---@param shell? string | ||
function M.setup(shell) | ||
vim.o.shell = shell or vim.o.shell | ||
end | ||
|
||
---@class TermOpts: CmdOptions | ||
---@field interactive? boolean | ||
---@field esc_esc? boolean | ||
---@field ctrl_hjkl? boolean | ||
|
||
-- Opens a floating terminal (interactive by default) | ||
---@param cmd? string[]|string | ||
---@param opts? TermOpts | ||
function M.open(cmd, opts) | ||
opts = vim.tbl_deep_extend("force", { | ||
ft = "lazyterm", | ||
size = { width = 0.9, height = 0.9 }, | ||
backdrop = require("util.init").has("edgy.nvim") and not cmd and 100 or nil, | ||
}, opts or {}, { persistent = true }) --[[@as TermOpts]] | ||
|
||
local termkey = vim.inspect({ cmd = cmd or "shell", cwd = opts.cwd, env = opts.env, count = vim.v.count1 }) | ||
|
||
if terminals[termkey] and terminals[termkey]:buf_valid() then | ||
terminals[termkey]:toggle() | ||
else | ||
terminals[termkey] = require("lazy.util").float_term(cmd, opts) | ||
local buf = terminals[termkey].buf | ||
vim.b[buf].lazyterm_cmd = cmd | ||
if opts.esc_esc == false then | ||
vim.keymap.set("t", "<esc>", "<esc>", { buffer = buf, nowait = true }) | ||
end | ||
if opts.ctrl_hjkl == false then | ||
vim.keymap.set("t", "<c-h>", "<c-h>", { buffer = buf, nowait = true }) | ||
vim.keymap.set("t", "<c-j>", "<c-j>", { buffer = buf, nowait = true }) | ||
vim.keymap.set("t", "<c-k>", "<c-k>", { buffer = buf, nowait = true }) | ||
vim.keymap.set("t", "<c-l>", "<c-l>", { buffer = buf, nowait = true }) | ||
end | ||
|
||
vim.keymap.set("n", "gf", function() | ||
local f = vim.fn.findfile(vim.fn.expand("<cfile>")) | ||
if f ~= "" then | ||
vim.cmd("close") | ||
vim.cmd("e " .. f) | ||
end | ||
end, { buffer = buf }) | ||
|
||
vim.api.nvim_create_autocmd("BufEnter", { | ||
buffer = buf, | ||
callback = function() | ||
vim.cmd.startinsert() | ||
end, | ||
}) | ||
|
||
vim.cmd("noh") | ||
end | ||
|
||
return terminals[termkey] | ||
end | ||
|
||
return M |
Oops, something went wrong.