[NeoVim] Actually working bootstrap

This commit is contained in:
2022-08-24 18:33:02 +02:00
parent b411775c77
commit 4059a6501a
13 changed files with 51 additions and 25 deletions

View File

@@ -0,0 +1,3 @@
(import-macros {: setup} :macros)
(setup :nvim-autopairs)

View File

@@ -2,6 +2,7 @@
(import-macros {: setup} :macros)
(local colors (require :solarized.colors))
(setup :bufferline {
:options {:close_command "Bdelete %d"
:right_mouse_command "Bdelete %d"
@@ -12,6 +13,7 @@
:highlights {:separator {:fg colors.bg_alt}
:separator_visible {:fg colors.bg_alt}
:separator_selected {:fg colors.bg_alt}}})
(map! [n] :<S-Right> ":bnext<CR>")
(map! [n] :<S-Left> ":bprevious<CR>")
(map! [n] :q ":Bdelete<CR>")

View File

@@ -0,0 +1,3 @@
(import-macros {: setup} :macros)
(setup :cinnamon)

View File

@@ -5,5 +5,6 @@
:keymaps {:view {:q ":tabc<CR>"}
:file_panel {:q ":tabc<CR>"}
:file_history_panel {:q ":tabc<CR>"}}})
(map! [n] :r ":DiffviewOpen<CR>")
(map! [n] :R ":DiffviewFileHistory %<CR>")

View File

@@ -1,6 +1,7 @@
(import-macros {: g! : set!} :hibiscus.vim)
(g! :maplocalleader ",")
(set! :clipboard "unnamedplus")
(set! :expandtab true)
(set! :fileencoding "utf-8")
@@ -13,8 +14,3 @@
(set! :smartcase true)
(set! :spelllang "en")
(set! :tabstop 2)
; Startup
(if (or (= (vim.fn.expand "%") "") (not= (vim.fn.isdirectory (vim.fn.expand "%")) 0))
((. (require :neo-tree.command) :_command) (vim.fn.getcwd))
((. (require :neo-tree.command) :_command) "show" (vim.fn.getcwd)))

View File

@@ -0,0 +1,3 @@
(import-macros {: setup} :macros)
(setup :gitsigns)

View File

@@ -0,0 +1,3 @@
(import-macros {: setup} :macros)
(setup :guess-indent)

View File

@@ -2,6 +2,7 @@
(import-macros {: setup} :macros)
(g! :neo_tree_remove_legacy_commands 1)
(setup :neo-tree {
:close_if_last_window true
:window {:width 30
@@ -31,6 +32,13 @@
[:modified]
[:diagnostics]
[:git_status]]}})
(map! [n] :f ":Neotree focus<CR>")
(map! [n] :F (fn [] (exec [[:Neotree "toggle"] [:Neotree "toggle" "action=show"]])))
(augroup! :neo-tree [[FileType] [qf] "set nobuflisted|call feedkeys(\"F\")"])
; Startup
(if (or (= (vim.fn.expand "%") "") (not= (vim.fn.isdirectory (vim.fn.expand "%")) 0))
((. (require :neo-tree.command) :_command) (vim.fn.getcwd))
((. (require :neo-tree.command) :_command) "show" (vim.fn.getcwd)))

View File

@@ -2,4 +2,3 @@
(setup :null-ls {
:sources [(. (. (. (require :null-ls) :builtins) :diagnostics) :flake8)]})

View File

@@ -1,6 +1,7 @@
(import-macros {: map!} :hibiscus.vim)
(local smart-splits (require :smart-splits))
(map! [n] :<C-Left> smart-splits.move_cursor_left)
(map! [n] :<C-Down> smart-splits.move_cursor_down)
(map! [n] :<C-Up> smart-splits.move_cursor_up)

View File

@@ -7,4 +7,5 @@
(g! :solarized_contrast true)
(g! :solarized_borders false)
(g! :solarized_disable_background false)
((. (require :solarized) :set))

View File

@@ -1,6 +1,7 @@
(import-macros {: setup} :macros)
(local actions (require :telescope.actions))
(setup :telescope {
:defaults {:mappings {:n {:S actions.file_split
:s actions.file_vsplit}}