Setup neovim, alacritty and fish for dms
This commit is contained in:
@@ -1,10 +1,8 @@
|
|||||||
[general]
|
[general]
|
||||||
import = [
|
import = [ "~/.config/alacritty/dank-theme.toml" ]
|
||||||
"~/.config/alacritty/dank-theme.toml"
|
|
||||||
]
|
|
||||||
|
|
||||||
[font]
|
[font]
|
||||||
size = 12.5
|
size = 13
|
||||||
|
|
||||||
[font.normal]
|
[font.normal]
|
||||||
family = "Hack Nerd Font"
|
family = "Hack Nerd Font"
|
||||||
|
|||||||
@@ -1,31 +1,31 @@
|
|||||||
[colors.primary]
|
[colors.primary]
|
||||||
background = '#101418'
|
background = '#131412'
|
||||||
foreground = '#e0e2e8'
|
foreground = '#e4e2df'
|
||||||
|
|
||||||
[colors.selection]
|
[colors.selection]
|
||||||
text = '#e0e2e8'
|
text = '#e4e2df'
|
||||||
background = '#084b72'
|
background = '#404a3b'
|
||||||
|
|
||||||
[colors.cursor]
|
[colors.cursor]
|
||||||
text = '#101418'
|
text = '#131412'
|
||||||
cursor = '#99ccfa'
|
cursor = '#bfcab7'
|
||||||
|
|
||||||
[colors.normal]
|
[colors.normal]
|
||||||
black = '#101418'
|
black = '#131412'
|
||||||
red = '#ff729d'
|
red = '#e88068'
|
||||||
green = '#7dfa8d'
|
green = '#6bca65'
|
||||||
yellow = '#fff772'
|
yellow = '#fcea71'
|
||||||
blue = '#7eb9ed'
|
blue = '#b3bfaa'
|
||||||
magenta = '#214c73'
|
magenta = '#545d4d'
|
||||||
cyan = '#99ccfa'
|
cyan = '#bfcab7'
|
||||||
white = '#eff7ff'
|
white = '#ccd4c7'
|
||||||
|
|
||||||
[colors.bright]
|
[colors.bright]
|
||||||
black = '#969ca2'
|
black = '#7d8379'
|
||||||
red = '#ff9fbc'
|
red = '#ffb19f'
|
||||||
green = '#a5ffb1'
|
green = '#a2f29d'
|
||||||
yellow = '#fffaa5'
|
yellow = '#fff3a5'
|
||||||
blue = '#aad7ff'
|
blue = '#d3decc'
|
||||||
magenta = '#b9deff'
|
magenta = '#f5ffee'
|
||||||
cyan = '#d2e9ff'
|
cyan = '#f8fff4'
|
||||||
white = '#f8fbff'
|
white = '#fbfff8'
|
||||||
|
|||||||
+29
-26
@@ -4,6 +4,8 @@
|
|||||||
# Disable fish greeting
|
# Disable fish greeting
|
||||||
set -g fish_greeting
|
set -g fish_greeting
|
||||||
|
|
||||||
|
alias nvim='/usr/local/nvim_012/bin/nvim'
|
||||||
|
|
||||||
# Core settings
|
# Core settings
|
||||||
set -gx EDITOR nvim
|
set -gx EDITOR nvim
|
||||||
set -gx VISUAL nvim
|
set -gx VISUAL nvim
|
||||||
@@ -21,6 +23,9 @@ set -gx GOCACHE "$HOME/.go/cache"
|
|||||||
set -gx GOROOT /usr/local/go
|
set -gx GOROOT /usr/local/go
|
||||||
set -gx PATH /usr/local/go/bin $GOPATH/bin $PATH
|
set -gx PATH /usr/local/go/bin $GOPATH/bin $PATH
|
||||||
|
|
||||||
|
# Direnv
|
||||||
|
direnv hook fish | source
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# FZF configuration
|
# FZF configuration
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
@@ -191,32 +196,30 @@ set -g __fish_git_prompt_char_dirtystate '+'
|
|||||||
set -g __fish_git_prompt_char_stagedstate '●'
|
set -g __fish_git_prompt_char_stagedstate '●'
|
||||||
set -g __fish_git_prompt_char_untrackedfiles ''
|
set -g __fish_git_prompt_char_untrackedfiles ''
|
||||||
|
|
||||||
direnv hook fish | source
|
|
||||||
|
|
||||||
# Auto-attach to tmux on interactive shell start
|
# Auto-attach to tmux on interactive shell start
|
||||||
if status is-interactive && not set -q TMUX
|
# if status is-interactive && not set -q TMUX
|
||||||
# Get all session names matching shell, shell-2, shell-3 etc
|
# # Get all session names matching shell, shell-2, shell-3 etc
|
||||||
set sessions (tmux list-sessions -F '#S' 2>/dev/null)
|
# set sessions (tmux list-sessions -F '#S' 2>/dev/null)
|
||||||
|
|
||||||
if test (count $sessions) -eq 0
|
# if test (count $sessions) -eq 0
|
||||||
tmux new-session -s shell
|
# tmux new-session -s shell
|
||||||
else
|
# else
|
||||||
# Check if any shell session is unattached and attach it
|
# # Check if any shell session is unattached and attach it
|
||||||
set target (tmux list-sessions -F '#{session_name} #{session_attached}' 2>/dev/null \
|
# set target (tmux list-sessions -F '#{session_name} #{session_attached}' 2>/dev/null \
|
||||||
| grep '^shell' | grep ' 0$' | head -1 | awk '{print $1}')
|
# | grep '^shell' | grep ' 0$' | head -1 | awk '{print $1}')
|
||||||
|
|
||||||
if test -n "$target"
|
# if test -n "$target"
|
||||||
tmux attach -t $target
|
# tmux attach -t $target
|
||||||
else
|
# else
|
||||||
# All shell sessions attached — find next number
|
# # All shell sessions attached — find next number
|
||||||
set nums 1
|
# set nums 1
|
||||||
for s in $sessions
|
# for s in $sessions
|
||||||
if string match -rq '^shell-(\d+)$' $s
|
# if string match -rq '^shell-(\d+)$' $s
|
||||||
set nums $nums (string replace 'shell-' '' $s)
|
# set nums $nums (string replace 'shell-' '' $s)
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
set next (math (string join \n $nums | sort -n | tail -1) + 1)
|
# set next (math (string join \n $nums | sort -n | tail -1) + 1)
|
||||||
tmux new-session -s shell-$next
|
# tmux new-session -s shell-$next
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
|||||||
@@ -42,6 +42,6 @@ map("v", "<Tab>" , ">gv")
|
|||||||
map("n", "gd", ":lua vim.lsp.buf.definition()<CR>")
|
map("n", "gd", ":lua vim.lsp.buf.definition()<CR>")
|
||||||
map("n", "<leader>p", ":b#<CR>")
|
map("n", "<leader>p", ":b#<CR>")
|
||||||
map("n", "<leader>e", ":Ex<CR>")
|
map("n", "<leader>e", ":Ex<CR>")
|
||||||
map("n", "<leader>c", ":bd<CR>")
|
map("n", "<leader>x", ":bd<CR>")
|
||||||
|
|
||||||
require("plugins")
|
require("plugins")
|
||||||
|
|||||||
@@ -2,12 +2,14 @@ vim.pack.add({
|
|||||||
{ src = "https://github.com/ibhagwan/fzf-lua" },
|
{ src = "https://github.com/ibhagwan/fzf-lua" },
|
||||||
{ src = "https://github.com/tribela/transparent.nvim" },
|
{ src = "https://github.com/tribela/transparent.nvim" },
|
||||||
{ src = "https://github.com/neovim/nvim-lspconfig" },
|
{ src = "https://github.com/neovim/nvim-lspconfig" },
|
||||||
{ src = "https://github.com/nvim-treesitter/nvim-treesitter", version = "main" },
|
|
||||||
{ src="https://github.com/folke/trouble.nvim" },
|
{ src="https://github.com/folke/trouble.nvim" },
|
||||||
{ src="https://github.com/stevearc/oil.nvim" },
|
{ src="https://github.com/stevearc/oil.nvim" },
|
||||||
{ src="https://github.com/akinsho/toggleterm.nvim" },
|
{ src="https://github.com/akinsho/toggleterm.nvim" },
|
||||||
|
{ src="https://github.com/romus204/tree-sitter-manager.nvim" }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
require("tree-sitter-manager").setup({})
|
||||||
|
|
||||||
local map = vim.keymap.set
|
local map = vim.keymap.set
|
||||||
local acmd = vim.api.nvim_create_autocmd
|
local acmd = vim.api.nvim_create_autocmd
|
||||||
|
|
||||||
@@ -20,16 +22,16 @@ acmd('FileType', {
|
|||||||
})
|
})
|
||||||
|
|
||||||
require("fzf-lua").setup()
|
require("fzf-lua").setup()
|
||||||
map("n", "<leader>ff", ":lua FzfLua.files()<CR>")
|
map("n", "<leader>f", ":lua FzfLua.files()<CR>")
|
||||||
map("n", "<leader>fo", ":lua FzfLua.buffers()<CR>")
|
map("n", "<leader>o", ":lua FzfLua.buffers()<CR>")
|
||||||
map("n", "<leader>sp", ":lua FzfLua.grep_project()<CR>")
|
map("n", "<leader>ss", ":lua FzfLua.grep_project()<CR>")
|
||||||
map("n", "<leader>sf", ":lua FzfLua.grep_curbuf()<CR>")
|
map("n", "<leader>sb", ":lua FzfLua.grep_curbuf()<CR>")
|
||||||
map("n", "<leader>sw", ":lua FzfLua.grep_cword()<CR>")
|
map("n", "<leader>sw", ":lua FzfLua.grep_cword()<CR>")
|
||||||
map("n", "<leader>sh", ":lua FzfLua.help_tags()<CR>")
|
map("n", "<leader>sh", ":lua FzfLua.help_tags()<CR>")
|
||||||
|
|
||||||
require("trouble").setup()
|
require("trouble").setup()
|
||||||
map("n", "<leader>pa", ":lua FzfLua.lsp_code_actions()<CR>")
|
map("n", "<leader>ca", ":lua FzfLua.lsp_code_actions()<CR>")
|
||||||
map('n', '<leader>pp', ":Trouble diagnostics toggle<CR>")
|
map('n', '<leader>cd', ":Trouble diagnostics toggle<CR>")
|
||||||
|
|
||||||
require("oil").setup({
|
require("oil").setup({
|
||||||
keymaps = {
|
keymaps = {
|
||||||
@@ -59,3 +61,12 @@ require("toggleterm").setup({
|
|||||||
})
|
})
|
||||||
map({"t","n"}, "<C-`>", function() require("toggleterm").toggle(1, nil, nil, "float") end)
|
map({"t","n"}, "<C-`>", function() require("toggleterm").toggle(1, nil, nil, "float") end)
|
||||||
map({"t","n"}, "<C-\\>", function() require("toggleterm").toggle(1, nil, nil, "vertical") end)
|
map({"t","n"}, "<C-\\>", function() require("toggleterm").toggle(1, nil, nil, "vertical") end)
|
||||||
|
|
||||||
|
local Terminal = require('toggleterm.terminal').Terminal
|
||||||
|
local lazygit = Terminal:new({ cmd = "gitu", hidden = true, direction = "float", })
|
||||||
|
|
||||||
|
function _lazygit_toggle()
|
||||||
|
lazygit:toggle()
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_set_keymap("n", "<leader>g", "<cmd>lua _lazygit_toggle()<CR>", {noremap = true, silent = true})
|
||||||
|
|||||||
+1
-6
@@ -125,6 +125,7 @@ if [ "$DO_LINKS" = true ]; then
|
|||||||
CREATED=0
|
CREATED=0
|
||||||
SKIPPED=0
|
SKIPPED=0
|
||||||
|
|
||||||
|
link_file "$DOTFILES_DIR/config/tmux/.tmux.conf" "$HOME/.tmux.conf"
|
||||||
link_file "$DOTFILES_DIR/config/kanata" "$HOME/.config/kanata"
|
link_file "$DOTFILES_DIR/config/kanata" "$HOME/.config/kanata"
|
||||||
link_file "$DOTFILES_DIR/config/fish" "$HOME/.config/fish"
|
link_file "$DOTFILES_DIR/config/fish" "$HOME/.config/fish"
|
||||||
link_file "$DOTFILES_DIR/config/alacritty" "$HOME/.config/alacritty"
|
link_file "$DOTFILES_DIR/config/alacritty" "$HOME/.config/alacritty"
|
||||||
@@ -132,12 +133,6 @@ if [ "$DO_LINKS" = true ]; then
|
|||||||
link_file "$DOTFILES_DIR/config/gitu" "$HOME/.config/gitu"
|
link_file "$DOTFILES_DIR/config/gitu" "$HOME/.config/gitu"
|
||||||
link_file "$DOTFILES_DIR/config/lf" "$HOME/.config/lf"
|
link_file "$DOTFILES_DIR/config/lf" "$HOME/.config/lf"
|
||||||
|
|
||||||
link_file "$DOTFILES_DIR/config/tmux/.tmux.conf" "$HOME/.tmux.conf"
|
|
||||||
link_file "$DOTFILES_DIR/config/helix/config.toml" "$HOME/.config/helix/config.toml"
|
|
||||||
link_file "$DOTFILES_DIR/config/helix/themes" "$HOME/.config/helix/themes"
|
|
||||||
link_file "$DOTFILES_DIR/config/gtk3/gtk.css" "$HOME/.config/gtk-3.0/gtk.css"
|
|
||||||
link_file "$DOTFILES_DIR/config/gtk4/gtk.css" "$HOME/.config/gtk-4.0/gtk.css"
|
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "🧾 Summary: $CREATED symlink(s) created or fixed, $SKIPPED skipped."
|
echo "🧾 Summary: $CREATED symlink(s) created or fixed, $SKIPPED skipped."
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
Reference in New Issue
Block a user