diff --git a/alacritty/.config/alacritty/alacritty.yml b/alacritty/.config/alacritty/alacritty.yml index 088573b..26340bc 100644 --- a/alacritty/.config/alacritty/alacritty.yml +++ b/alacritty/.config/alacritty/alacritty.yml @@ -24,9 +24,12 @@ colors: foreground: "#ebdbb2" cursor: - style: "Block" + style: + shape: "Block" + blinking: "On" unfocused_hollow: true font: + #normal: { "family": "APL 385 Unicode" } normal: { "family": "Fira Code" } #normal: { "family": "Jetbrains Mono" } #normal: { "family": "Victor Mono" } diff --git a/git/.gitconfig b/git/.gitconfig index e369a61..fa86413 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -6,14 +6,14 @@ helper = store [core] autocrlf = input - ;pager = delta + pager = delta [pull] rebase = false [github] user = ElKowar -[diff] - external = "difft" +;[diff] + ;external = "difft" [delta] diff --git a/nvim/.config/nvim/fnl/dots/keybinds.fnl b/nvim/.config/nvim/fnl/dots/keybinds.fnl index fe9337e..04e8bbc 100644 --- a/nvim/.config/nvim/fnl/dots/keybinds.fnl +++ b/nvim/.config/nvim/fnl/dots/keybinds.fnl @@ -35,6 +35,13 @@ (utils.keymap :n : "HopChar2") +(utils.keymap :i : "(copilot-suggest)") +(utils.keymap :i : "(copilot-dismiss)") +(utils.keymap :i : "(copilot-next)") +(utils.keymap :i : "(copilot-previous)") +(utils.keymap :i : "Copilot panel") + + ; Fix keybinds in linewrapped mode ;(utils.keymap [:n] :j "gj") diff --git a/nvim/.config/nvim/fnl/dots/plugins.fnl b/nvim/.config/nvim/fnl/dots/plugins.fnl index 1a4679a..eeee795 100644 --- a/nvim/.config/nvim/fnl/dots/plugins.fnl +++ b/nvim/.config/nvim/fnl/dots/plugins.fnl @@ -88,6 +88,8 @@ :nvim-treesitter/nvim-treesitter {:config #(require "dots.plugins.treesitter") :event ["BufEnter"] :build ":TSUpdate"} + :RRethy/nvim-treesitter-textsubjects {:dependencies [:nvim-treesitter/nvim-treesitter]} + :JoosepAlviste/nvim-ts-context-commentstring {:event ["BufEnter"] :dependencies [:nvim-treesitter/nvim-treesitter]} diff --git a/nvim/.config/nvim/fnl/dots/plugins/gitsigns.fnl b/nvim/.config/nvim/fnl/dots/plugins/gitsigns.fnl index 19f57fb..8e16663 100644 --- a/nvim/.config/nvim/fnl/dots/plugins/gitsigns.fnl +++ b/nvim/.config/nvim/fnl/dots/plugins/gitsigns.fnl @@ -18,19 +18,21 @@ (let [scrollbar-gitsigns (require "scrollbar.handlers.gitsigns")] (scrollbar-gitsigns.setup)) -(vim.cmd - (.. - " - augroup gitsignsHighlight - autocmd ColorScheme * :hi! GitSignsAdd gui='NONE' guibg='NONE' guifg='" colors.bright_aqua "' - autocmd ColorScheme * :hi! GitSignsDelete gui='NONE' guibg='NONE' guifg='" colors.neutral_red "' - autocmd ColorScheme * :hi! GitSignsChange gui='NONE' guibg='NONE' guifg='" colors.bright_blue "' +; the above code, but using vim.api.nvim_create_autocomand +(vim.api.nvim_create_autocmd + "ColorScheme" + {:pattern "*" + :callback + (fn [] + (utils.highlight-add "GitSignsAdd" {:gui "NONE" :bg "NONE" :fg colors.bright_aqua}) + (utils.highlight-add "GitSignsDelete" {:gui "NONE" :bg "NONE" :fg colors.neutral_red}) + (utils.highlight-add "GitSignsChange" {:gui "NONE" :bg "NONE" :fg colors.bright_blue}) + (utils.highlight-add "ScrollbarGitAdd" {:gui "NONE" :bg "NONE" :fg colors.bright_aqua}) + (utils.highlight-add "ScrollbarGitDelete" {:gui "NONE" :bg "NONE" :fg colors.neutral_red}) + (utils.highlight-add "ScrollbarGitChange" {:gui "NONE" :bg "NONE" :fg colors.bright_blue}))}) + + - autocmd ColorScheme * :hi! ScrollbarGitAdd gui='NONE' guibg='NONE' guifg='" colors.bright_aqua "' - autocmd ColorScheme * :hi! ScrollbarGitDelete gui='NONE' guibg='NONE' guifg='" colors.neutral_red "' - autocmd ColorScheme * :hi! ScrollbarGitChange gui='NONE' guibg='NONE' guifg='" colors.bright_blue "' - augroup END - ")) ;(utils.highlight :GitSignsAdd {:bg "NONE" :fg colors.bright_aqua}) ;(utils.highlight :GitSignsDelete {:bg "NONE" :fg colors.neutral_red}) ;(utils.highlight :GitSignsChange {:bg "NONE" :fg colors.bright_blue}) diff --git a/nvim/.config/nvim/fnl/dots/plugins/lsp.fnl b/nvim/.config/nvim/fnl/dots/plugins/lsp.fnl index bb74125..d606120 100644 --- a/nvim/.config/nvim/fnl/dots/plugins/lsp.fnl +++ b/nvim/.config/nvim/fnl/dots/plugins/lsp.fnl @@ -87,7 +87,7 @@ (init-lsp :powershell_es {:bundle_path "/home/leon/powershell"}) ;(ltex-ls.init) - + @@ -165,6 +165,7 @@ (init-lsp :ewwls)))) + ; Idris2 ----------------------------------------------------------- <<<<< (def autostart-semantic-highlighting true) diff --git a/nvim/.config/nvim/fnl/dots/plugins/treesitter.fnl b/nvim/.config/nvim/fnl/dots/plugins/treesitter.fnl index e7a98d1..ec25905 100644 --- a/nvim/.config/nvim/fnl/dots/plugins/treesitter.fnl +++ b/nvim/.config/nvim/fnl/dots/plugins/treesitter.fnl @@ -5,7 +5,7 @@ require-macros [macros]}) (configs.setup - {:ensure_installed [] + {:ensure_installed ["rust" "fennel"] ; :ensure_installed "maintained" :highlight {:enable true :disable ["fennel" "rust" "haskell"]} @@ -16,6 +16,9 @@ :node_decremental "gsh" :scope_incremental "gsj" :scope_decremental "gsk"}} + :textsubjects {:enable true + :prev_selection "," + :keymaps {"." "textsubjects-smart"}} ; Might fuck with gitsigns ;:rainbow {:enable true diff --git a/nvim/.config/nvim/fnl/init.fnl b/nvim/.config/nvim/fnl/init.fnl index 1276ed6..9aa7109 100644 --- a/nvim/.config/nvim/fnl/init.fnl +++ b/nvim/.config/nvim/fnl/init.fnl @@ -70,15 +70,21 @@ (vim-let &t_ut "") -(vim.cmd "autocmd! BufReadPost *.hs :set shiftwidth=2") -(vim.cmd "autocmd! FileType vim setlocal foldmethod=marker") +(vim.api.nvim_create_autocmd "BufWritePost" {:pattern "*.hs" :callback #(set vim.opt.shiftwidth 2)}) +(vim.api.nvim_create_autocmd "FileType" {:pattern "vim" :callback #(set vim.opt_local.foldmethod "marker")}) ;Disables automatic commenting on newline) -(vim.cmd "autocmd! FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o") +(vim.api.nvim_create_autocmd "FileType" + {:pattern "*" + :callback #(set vim.opt_local.formatoptions (vim.o.formatoptions:gsub "[cor]" ""))}) + ; Auto-close quickfix list when element is selected) -(vim.cmd "autocmd! FileType qf nnoremap :cclose") - -(vim.cmd "autocmd! TextYankPost * silent! lua vim.highlight.on_yank {higroup=\"IncSearch\", timeout=300}") +(vim.api.nvim_create_autocmd "FileType" + {:pattern "qf" + :callback #(vim.cmd "nnoremap :cclose")}) +(vim.api.nvim_create_autocmd "TextYankPost" + {:pattern "*" + :callback #(vim.highlight.on_yank {:higroup "IncSearch" :timeout 300})}) (set vim.g.copilot_filetypes {:TelescopePrompt false}) @@ -149,8 +155,8 @@ ; Plugin config ----------------------- foldstart -(set vim.g.VM_leader "m") ; visual-multi leader +(set vim.g.VM_leader "m") ; visual-multi leader ; rust.vim (set vim.g.rust_clip_command "xclip -selection clipboard") @@ -162,30 +168,6 @@ ; foldend -; :: and _ as space ------------------------------------------------------------------- foldstart -(var remapped-space nil) -(fn _G.RebindShit [newKey] - (set remapped-space {:old (vim.fn.maparg : :i) - :cur newKey}) - (utils.keymap :i : newKey {:buffer true})) - -(fn _G.UnbindSpaceStuff [] - (when (and remapped-space (~= remapped-space {})) - (utils.del-keymap :i : true) - (when (~= remapped-space.old "") - (utils.keymap :i : remapped-space.old {:buffer true})) - (set remapped-space nil))) - - - -(nvim.command "autocmd! InsertLeave * :call v:lua.UnbindSpaceStuff()") -(utils.keymap :n "j" ":call v:lua.RebindShit('_')") -(utils.keymap :n "k" ":call v:lua.RebindShit('::')") -(utils.keymap :i "j" ":call v:lua.RebindShit('_')") -(utils.keymap :i "k" ":call v:lua.RebindShit('::')") -(utils.keymap :n "รถ" "a") - -; foldend ; :: autoclose empty unnamed buffers ----------------------------------------------- foldstart @@ -207,6 +189,7 @@ (vim.cmd "command! -nargs=1 L :lua print(vim.inspect())") +(vim.cmd "Copilot enable") (utils.run-deferred) diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 3b1f3ed..0f8d88f 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -51,6 +51,7 @@ "nvim-lspconfig": { "branch": "master", "commit": "1712672e4da3003a0dd9f771d30389600b360f42" }, "nvim-scrollbar": { "branch": "main", "commit": "6a2065fbcd032075a06d2ab54508b69842bc4496" }, "nvim-treesitter": { "branch": "master", "commit": "2c2430d42f30d1aef8715aed933272c9a6898f4e" }, + "nvim-treesitter-textsubjects": { "branch": "master", "commit": "b913508f503527ff540f7fe2dcf1bf1d1f259887" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "a0f89563ba36b3bacd62cf967b46beb4c2c29e52" }, "nvim-web-devicons": { "branch": "master", "commit": "bd7a222287c5828cd0607cd0a5605e52f0460074" }, "nvim.lua": { "branch": "master", "commit": "5d57be0b6eea6c06977b1c5fe0752da909cf4154" },