Refactor Neovim config for use with Neovide

This commit is contained in:
mitchell 2024-07-13 01:23:20 -04:00
parent 90a57e23cc
commit adf21544eb
7 changed files with 200 additions and 181 deletions

View File

@ -13,6 +13,7 @@ function define_aliases -a uname -d 'Defines aliases for commonly used commands'
alias age-k 'age --decrypt --identity ~/.secrets/id_ed25519 ~/.secrets/age_keys.age' alias age-k 'age --decrypt --identity ~/.secrets/id_ed25519 ~/.secrets/age_keys.age'
alias bb 'bun --bun' alias bb 'bun --bun'
alias pn pnpm alias pn pnpm
alias nv 'neovide --fork; and clear'
switch "$uname" switch "$uname"
case Linux case Linux

View File

@ -3,7 +3,7 @@ function fish_user_key_bindings
bind --mode insert ,a 'ssh_add; commandline -f repaint' bind --mode insert ,a 'ssh_add; commandline -f repaint'
bind --mode insert ,p 'nvim +"Telescope git_files"; commandline -f repaint' bind --mode insert ,p 'nvim +"Telescope git_files"; commandline -f repaint'
bind --mode insert ,f 'nvim +"Telescope find_files"; commandline -f repaint' bind --mode insert ,f 'nvim +"Telescope find_files"; commandline -f repaint'
bind --mode insert ,n 'nvim +Neotree; commandline -f repaint' bind --mode insert ,n 'nvim .; commandline -f repaint'
bind --mode insert ,s 'sysz; commandline -f repaint' bind --mode insert ,s 'sysz; commandline -f repaint'
bind --mode insert ,z 'zi; commandline -f repaint' bind --mode insert ,z 'zi; commandline -f repaint'
bind --mode insert ,t 'fzf-file-widget' bind --mode insert ,t 'fzf-file-widget'

View File

@ -1,6 +1,6 @@
function sshre -d 'Remove list of hosts from ssh known_hosts' function sshre -d 'Remove list of hosts from ssh known_hosts'
alias ssh-rm 'ssh-keygen -f ~/.ssh/known_hosts -R' alias ssh-rm 'ssh-keygen -f ~/.ssh/known_hosts -R'
set -l hosts kamino khetanna marauder malevolence pi.hole git set -l hosts 10.0.0.1 10.0.0.5 git.mjfs.us dns cloud net git
set -l domains lan m set -l domains lan m
if test -n "$argv" if test -n "$argv"

View File

@ -26,7 +26,8 @@ inoremap jj <Esc>
let mapleader = ',' let mapleader = ','
nnoremap <leader>f <cmd>ALEFix<cr> nnoremap <leader>f <cmd>ALEFix<cr>
nnoremap <leader>a <cmd>ALEToggle<cr> nnoremap <leader>a <cmd>ALEToggle<cr>
nnoremap <leader>n <cmd>Neotree<cr> nnoremap <leader>nn <cmd>Neotree toggle show git_status<cr>
nnoremap <leader>np <cmd>Neotree float reveal_force_cwd<cr>
nnoremap <leader>t <cmd>Telescope<cr> nnoremap <leader>t <cmd>Telescope<cr>
nnoremap <leader>p <cmd>Telescope git_files<cr> nnoremap <leader>p <cmd>Telescope git_files<cr>
nnoremap <C-p> <cmd>Telescope find_files<cr> nnoremap <C-p> <cmd>Telescope find_files<cr>
@ -50,7 +51,9 @@ vnoremap // y/\V<C-R>=escape(@",'/\')<CR><CR>
colorscheme kanagawa colorscheme kanagawa
let g:neovide_scale_factor = 0.7 let g:neovide_scale_factor = 0.75
let g:neovide_transparency = 0.7
let g:neovide_cursor_vfx_mode = 'sonicboom'
let g:ale_linters_explicit = 1 let g:ale_linters_explicit = 1
let g:ale_completion_enabled = 0 let g:ale_completion_enabled = 0

View File

@ -37,17 +37,27 @@ plug("nvim-treesitter/nvim-treesitter-context")
vim.call("plug#end") vim.call("plug#end")
vim.opt.guifont = { "JetBrainsMono Nerd Font", "h13" } vim.opt.guifont = "JetBrainsMono Nerd Font:h13"
vim.g.coq_settings = { auto_start = true } vim.g.coq_settings = { auto_start = true }
require("neo-tree").setup()
require("kanagawa").setup({ require("kanagawa").setup({
transparent = true, transparent = not vim.g.neovide,
}) })
require("bufferline").setup({ require("bufferline").setup({
options = { options = {
separator_style = "slant", separator_style = "slope",
offsets = {
{
filetype = "neo-tree",
text = "explorer",
highlight = "Directory",
separator = true, -- use a "true" to enable the default, or set your own character
},
},
}, },
}) })
@ -103,13 +113,15 @@ require("nvim-treesitter.configs").setup({
"c", "c",
"lua", "lua",
"vim", "vim",
"regex",
"fish", "fish",
"typescript", "typescript",
"javascript", "javascript",
"tsx",
"go", "go",
"elixir", "elixir",
"vue", "vue",
"regex", "groovy",
}, },
-- Automatically install missing parsers when entering buffer -- Automatically install missing parsers when entering buffer

View File

@ -13,181 +13,184 @@ magenta = '#957fb8'
cyan = '#6a9589' cyan = '#6a9589'
white = '#c8c093' white = '#c8c093'
[jobs] #[jobs]
symbol = "" #symbol = ""
#
[aws] [aws]
disabled = true disabled = true
symbol = " " #symbol = " "
#
[gcloud]
disabled = true
#
[ruby] [ruby]
disabled = true disabled = true
symbol = " " #symbol = " "
#
[nodejs] [nodejs]
disabled = false disabled = false
symbol = " " #symbol = " "
#
[buf] #[buf]
symbol = "Buf " #symbol = "Buf "
#
[bun] #[bun]
symbol = " " #symbol = " "
#
[c] #[c]
symbol = " " #symbol = " "
#
[conda] #[conda]
symbol = " " #symbol = " "
#
[crystal] #[crystal]
symbol = " " #symbol = " "
#
[dart] #[dart]
symbol = " " #symbol = " "
#
[directory] #[directory]
read_only = " 󰌾" #read_only = " 󰌾"
#
[docker_context] #[docker_context]
symbol = " " #symbol = " "
#
[elixir] #[elixir]
symbol = " " #symbol = " "
#
[elm] #[elm]
symbol = " " #symbol = " "
#
[fennel] #[fennel]
symbol = " " #symbol = " "
#
[fossil_branch] #[fossil_branch]
symbol = " " #symbol = " "
#
[git_branch] #[git_branch]
symbol = " " #symbol = " "
#
[git_status] #[git_status]
ahead = '^' #ahead = '^'
behind = 'v' #behind = 'v'
deleted = "x" #deleted = "x"
#
[golang] #[golang]
symbol = " " #symbol = " "
#
[guix_shell] #[guix_shell]
symbol = " " #symbol = " "
#
[haskell] #[haskell]
symbol = " " #symbol = " "
#
[haxe] #[haxe]
symbol = " " #symbol = " "
#
[hg_branch] #[hg_branch]
symbol = " " #symbol = " "
#
[hostname] #[hostname]
ssh_symbol = " " #ssh_symbol = " "
#
[java] #[java]
symbol = " " #symbol = " "
#
[julia] #[julia]
symbol = " " #symbol = " "
#
[kotlin] #[kotlin]
symbol = " " #symbol = " "
#
[lua] #[lua]
symbol = " " #symbol = " "
#
[memory_usage] #[memory_usage]
symbol = "󰍛 " #symbol = "󰍛 "
#
[meson] #[meson]
symbol = "󰔷 " #symbol = "󰔷 "
#
[nim] #[nim]
symbol = "󰆥 " #symbol = "󰆥 "
#
[nix_shell] #[nix_shell]
symbol = " " #symbol = " "
#
[ocaml] #[ocaml]
symbol = " " #symbol = " "
#
[os.symbols] #[os.symbols]
Alpaquita = " " #Alpaquita = " "
Alpine = " " #Alpine = " "
AlmaLinux = " " #AlmaLinux = " "
Amazon = " " #Amazon = " "
Android = " " #Android = " "
Arch = " " #Arch = " "
Artix = " " #Artix = " "
CentOS = " " #CentOS = " "
Debian = " " #Debian = " "
DragonFly = " " #DragonFly = " "
Emscripten = " " #Emscripten = " "
EndeavourOS = " " #EndeavourOS = " "
Fedora = " " #Fedora = " "
FreeBSD = " " #FreeBSD = " "
Garuda = "󰛓 " #Garuda = "󰛓 "
Gentoo = " " #Gentoo = " "
HardenedBSD = "󰞌 " #HardenedBSD = "󰞌 "
Illumos = "󰈸 " #Illumos = "󰈸 "
Kali = " " #Kali = " "
Linux = " " #Linux = " "
Mabox = " " #Mabox = " "
Macos = " " #Macos = " "
Manjaro = " " #Manjaro = " "
Mariner = " " #Mariner = " "
MidnightBSD = " " #MidnightBSD = " "
Mint = " " #Mint = " "
NetBSD = " " #NetBSD = " "
NixOS = " " #NixOS = " "
OpenBSD = "󰈺 " #OpenBSD = "󰈺 "
openSUSE = " " #openSUSE = " "
OracleLinux = "󰌷 " #OracleLinux = "󰌷 "
Pop = " " #Pop = " "
Raspbian = " " #Raspbian = " "
Redhat = " " #Redhat = " "
RedHatEnterprise = " " #RedHatEnterprise = " "
RockyLinux = " " #RockyLinux = " "
Redox = "󰀘 " #Redox = "󰀘 "
Solus = "󰠳 " #Solus = "󰠳 "
SUSE = " " #SUSE = " "
Ubuntu = " " #Ubuntu = " "
Unknown = " " #Unknown = " "
Void = " " #Void = " "
Windows = "󰍲 " #Windows = "󰍲 "
#
[package] #[package]
symbol = "󰏗 " #symbol = "󰏗 "
#
[perl] #[perl]
symbol = " " #symbol = " "
#
[php] #[php]
symbol = " " #symbol = " "
#
[pijul_channel] #[pijul_channel]
symbol = " " #symbol = " "
#
[python] #[python]
symbol = " " #symbol = " "
#
[rlang] #[rlang]
symbol = "󰟔 " #symbol = "󰟔 "
#
[rust] #[rust]
symbol = " " #symbol = " "
#
[scala] #[scala]
symbol = " " #symbol = " "
#
[swift] #[swift]
symbol = " " #symbol = " "
#
[zig] #[zig]
symbol = " " #symbol = " "

View File

@ -26,7 +26,7 @@ config.colors = {
indexed = { [16] = "#ffa066", [17] = "#ff5d62" }, indexed = { [16] = "#ffa066", [17] = "#ff5d62" },
} }
config.window_background_opacity = is_darwin() and 0.7 or 0.65 config.window_background_opacity = 0.7
config.window_decorations = "RESIZE" config.window_decorations = "RESIZE"
config.font_size = is_darwin() and 13 or 11 config.font_size = is_darwin() and 13 or 11