This commit is contained in:
elkowar 2023-02-25 18:07:21 +01:00
parent 2279e97c15
commit 1031294c8d
No known key found for this signature in database
GPG key ID: E321AD71B1D1F27F
9 changed files with 51 additions and 49 deletions

View file

@ -24,9 +24,12 @@ colors:
foreground: "#ebdbb2" foreground: "#ebdbb2"
cursor: cursor:
style: "Block" style:
shape: "Block"
blinking: "On"
unfocused_hollow: true unfocused_hollow: true
font: font:
#normal: { "family": "APL 385 Unicode" }
normal: { "family": "Fira Code" } normal: { "family": "Fira Code" }
#normal: { "family": "Jetbrains Mono" } #normal: { "family": "Jetbrains Mono" }
#normal: { "family": "Victor Mono" } #normal: { "family": "Victor Mono" }

View file

@ -6,14 +6,14 @@
helper = store helper = store
[core] [core]
autocrlf = input autocrlf = input
;pager = delta pager = delta
[pull] [pull]
rebase = false rebase = false
[github] [github]
user = ElKowar user = ElKowar
[diff] ;[diff]
external = "difft" ;external = "difft"
[delta] [delta]

View file

@ -35,6 +35,13 @@
(utils.keymap :n :<Backspace> "<cmd>HopChar2<CR>") (utils.keymap :n :<Backspace> "<cmd>HopChar2<CR>")
(utils.keymap :i :<C-l><C-j> "<Plug>(copilot-suggest)")
(utils.keymap :i :<C-l><C-d> "<Plug>(copilot-dismiss)")
(utils.keymap :i :<C-l><C-n> "<Plug>(copilot-next)")
(utils.keymap :i :<C-l><C-p> "<Plug>(copilot-previous)")
(utils.keymap :i :<C-l><C-o> "<cmd>Copilot panel<cr>")
; Fix keybinds in linewrapped mode ; Fix keybinds in linewrapped mode
;(utils.keymap [:n] :j "gj") ;(utils.keymap [:n] :j "gj")

View file

@ -88,6 +88,8 @@
:nvim-treesitter/nvim-treesitter {:config #(require "dots.plugins.treesitter") :nvim-treesitter/nvim-treesitter {:config #(require "dots.plugins.treesitter")
:event ["BufEnter"] :event ["BufEnter"]
:build ":TSUpdate"} :build ":TSUpdate"}
:RRethy/nvim-treesitter-textsubjects {:dependencies [:nvim-treesitter/nvim-treesitter]}
:JoosepAlviste/nvim-ts-context-commentstring {:event ["BufEnter"] :JoosepAlviste/nvim-ts-context-commentstring {:event ["BufEnter"]
:dependencies [:nvim-treesitter/nvim-treesitter]} :dependencies [:nvim-treesitter/nvim-treesitter]}

View file

@ -18,19 +18,21 @@
(let [scrollbar-gitsigns (require "scrollbar.handlers.gitsigns")] (let [scrollbar-gitsigns (require "scrollbar.handlers.gitsigns")]
(scrollbar-gitsigns.setup)) (scrollbar-gitsigns.setup))
(vim.cmd ; the above code, but using vim.api.nvim_create_autocomand
(.. (vim.api.nvim_create_autocmd
" "ColorScheme"
augroup gitsignsHighlight {:pattern "*"
autocmd ColorScheme * :hi! GitSignsAdd gui='NONE' guibg='NONE' guifg='" colors.bright_aqua "' :callback
autocmd ColorScheme * :hi! GitSignsDelete gui='NONE' guibg='NONE' guifg='" colors.neutral_red "' (fn []
autocmd ColorScheme * :hi! GitSignsChange gui='NONE' guibg='NONE' guifg='" colors.bright_blue "' (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 :GitSignsAdd {:bg "NONE" :fg colors.bright_aqua})
;(utils.highlight :GitSignsDelete {:bg "NONE" :fg colors.neutral_red}) ;(utils.highlight :GitSignsDelete {:bg "NONE" :fg colors.neutral_red})
;(utils.highlight :GitSignsChange {:bg "NONE" :fg colors.bright_blue}) ;(utils.highlight :GitSignsChange {:bg "NONE" :fg colors.bright_blue})

View file

@ -165,6 +165,7 @@
(init-lsp :ewwls)))) (init-lsp :ewwls))))
; Idris2 ----------------------------------------------------------- <<<<< ; Idris2 ----------------------------------------------------------- <<<<<
(def autostart-semantic-highlighting true) (def autostart-semantic-highlighting true)

View file

@ -5,7 +5,7 @@
require-macros [macros]}) require-macros [macros]})
(configs.setup (configs.setup
{:ensure_installed [] {:ensure_installed ["rust" "fennel"]
; :ensure_installed "maintained" ; :ensure_installed "maintained"
:highlight {:enable true :highlight {:enable true
:disable ["fennel" "rust" "haskell"]} :disable ["fennel" "rust" "haskell"]}
@ -16,6 +16,9 @@
:node_decremental "gsh" :node_decremental "gsh"
:scope_incremental "gsj" :scope_incremental "gsj"
:scope_decremental "gsk"}} :scope_decremental "gsk"}}
:textsubjects {:enable true
:prev_selection ","
:keymaps {"." "textsubjects-smart"}}
; Might fuck with gitsigns ; Might fuck with gitsigns
;:rainbow {:enable true ;:rainbow {:enable true

View file

@ -70,15 +70,21 @@
(vim-let &t_ut "") (vim-let &t_ut "")
(vim.cmd "autocmd! BufReadPost *.hs :set shiftwidth=2") (vim.api.nvim_create_autocmd "BufWritePost" {:pattern "*.hs" :callback #(set vim.opt.shiftwidth 2)})
(vim.cmd "autocmd! FileType vim setlocal foldmethod=marker") (vim.api.nvim_create_autocmd "FileType" {:pattern "vim" :callback #(set vim.opt_local.foldmethod "marker")})
;Disables automatic commenting on newline) ;Disables automatic commenting on newline)
(vim.cmd "autocmd! FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o") (vim.api.nvim_create_autocmd "FileType"
; Auto-close quickfix list when element is selected) {:pattern "*"
(vim.cmd "autocmd! FileType qf nnoremap <buffer> <CR> <CR>:cclose<CR>") :callback #(set vim.opt_local.formatoptions (vim.o.formatoptions:gsub "[cor]" ""))})
(vim.cmd "autocmd! TextYankPost * silent! lua vim.highlight.on_yank {higroup=\"IncSearch\", timeout=300}") ; Auto-close quickfix list when element is selected)
(vim.api.nvim_create_autocmd "FileType"
{:pattern "qf"
:callback #(vim.cmd "nnoremap <buffer> <CR> <CR>:cclose<CR>")})
(vim.api.nvim_create_autocmd "TextYankPost"
{:pattern "*"
:callback #(vim.highlight.on_yank {:higroup "IncSearch" :timeout 300})})
(set vim.g.copilot_filetypes {:TelescopePrompt false}) (set vim.g.copilot_filetypes {:TelescopePrompt false})
@ -149,8 +155,8 @@
; Plugin config ----------------------- foldstart ; Plugin config ----------------------- foldstart
(set vim.g.VM_leader "m") ; visual-multi leader
(set vim.g.VM_leader "m") ; visual-multi leader
; rust.vim ; rust.vim
(set vim.g.rust_clip_command "xclip -selection clipboard") (set vim.g.rust_clip_command "xclip -selection clipboard")
@ -162,30 +168,6 @@
; foldend ; foldend
; :: and _ as space ------------------------------------------------------------------- foldstart
(var remapped-space nil)
(fn _G.RebindShit [newKey]
(set remapped-space {:old (vim.fn.maparg :<Space> :i)
:cur newKey})
(utils.keymap :i :<Space> newKey {:buffer true}))
(fn _G.UnbindSpaceStuff []
(when (and remapped-space (~= remapped-space {}))
(utils.del-keymap :i :<Space> true)
(when (~= remapped-space.old "")
(utils.keymap :i :<Space> remapped-space.old {:buffer true}))
(set remapped-space nil)))
(nvim.command "autocmd! InsertLeave * :call v:lua.UnbindSpaceStuff()")
(utils.keymap :n "<Tab>j" ":call v:lua.RebindShit('_')<CR>")
(utils.keymap :n "<Tab>k" ":call v:lua.RebindShit('::')<CR>")
(utils.keymap :i "<Tab>j" "<space><C-o>:call v:lua.RebindShit('_')<CR>")
(utils.keymap :i "<Tab>k" "<space><C-o>:call v:lua.RebindShit('::')<CR>")
(utils.keymap :n "ö" "a")
; foldend
; :: autoclose empty unnamed buffers ----------------------------------------------- foldstart ; :: autoclose empty unnamed buffers ----------------------------------------------- foldstart
@ -207,6 +189,7 @@
(vim.cmd (vim.cmd
"command! -nargs=1 L :lua print(vim.inspect(<args>))") "command! -nargs=1 L :lua print(vim.inspect(<args>))")
(vim.cmd "Copilot enable")
(utils.run-deferred) (utils.run-deferred)

View file

@ -51,6 +51,7 @@
"nvim-lspconfig": { "branch": "master", "commit": "1712672e4da3003a0dd9f771d30389600b360f42" }, "nvim-lspconfig": { "branch": "master", "commit": "1712672e4da3003a0dd9f771d30389600b360f42" },
"nvim-scrollbar": { "branch": "main", "commit": "6a2065fbcd032075a06d2ab54508b69842bc4496" }, "nvim-scrollbar": { "branch": "main", "commit": "6a2065fbcd032075a06d2ab54508b69842bc4496" },
"nvim-treesitter": { "branch": "master", "commit": "2c2430d42f30d1aef8715aed933272c9a6898f4e" }, "nvim-treesitter": { "branch": "master", "commit": "2c2430d42f30d1aef8715aed933272c9a6898f4e" },
"nvim-treesitter-textsubjects": { "branch": "master", "commit": "b913508f503527ff540f7fe2dcf1bf1d1f259887" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "a0f89563ba36b3bacd62cf967b46beb4c2c29e52" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "a0f89563ba36b3bacd62cf967b46beb4c2c29e52" },
"nvim-web-devicons": { "branch": "master", "commit": "bd7a222287c5828cd0607cd0a5605e52f0460074" }, "nvim-web-devicons": { "branch": "master", "commit": "bd7a222287c5828cd0607cd0a5605e52f0460074" },
"nvim.lua": { "branch": "master", "commit": "5d57be0b6eea6c06977b1c5fe0752da909cf4154" }, "nvim.lua": { "branch": "master", "commit": "5d57be0b6eea6c06977b1c5fe0752da909cf4154" },