about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2022-02-26 13:14:11 +0900
committersefidel <contact@sefidel.net>2022-02-26 14:17:47 +0900
commit4152f871951afdede2db2a08acff85aea2999c06 (patch)
tree12a799645030fd38b5af7a42863127f4647724db
parentee0fbc01827d8136fd8499772c1e1038b309609e (diff)
downloadnvimrc-4152f871951afdede2db2a08acff85aea2999c06.tar.gz
nvimrc-4152f871951afdede2db2a08acff85aea2999c06.zip
feat!: reduce bloatness
-rw-r--r--fnl/nvrc/colors.fnl2
-rw-r--r--fnl/nvrc/ignite.fnl7
-rw-r--r--fnl/nvrc/macro/misc.fnl1
-rw-r--r--fnl/nvrc/options.fnl51
-rw-r--r--fnl/nvrc/pack.fnl22
-rw-r--r--fnl/nvrc/packs/filetype.fnl3
-rw-r--r--init.lua9
7 files changed, 43 insertions, 52 deletions
diff --git a/fnl/nvrc/colors.fnl b/fnl/nvrc/colors.fnl
index 7750814..58ab4cd 100644
--- a/fnl/nvrc/colors.fnl
+++ b/fnl/nvrc/colors.fnl
@@ -41,7 +41,7 @@
   (highlight :CmpItemMenu {:fg (. colors :fg)})
 
   ; Misc
-  (highlight :StatusLine {:bg (. colors :black)})
+  (highlight :StatusLine {:bg (. colors :bg)})
   (highlight :StatusLineNC {:fg (. colors :grey) :bg (. colors :black) :underline true})
   (highlight :TabLine {:fg (. colors :fg) :bg (. colors :mgrey)})
   (highlight :TabLineFill {:fg (. colors :fg) :bg (. colors :bg)})
diff --git a/fnl/nvrc/ignite.fnl b/fnl/nvrc/ignite.fnl
index a57fd0e..58f3414 100644
--- a/fnl/nvrc/ignite.fnl
+++ b/fnl/nvrc/ignite.fnl
@@ -1,10 +1,5 @@
 ; Get the rocket going
-(import-macros {: set!} :nvrc.macro.set)
-
-((. (require :nvrc.colors) :apply) :jellybeans)
 (require :nvrc.options)
-(require :nvrc.pack)
 (require :nvrc.keymaps)
 (require :nvrc.events)
-
-(set! shadafile "")
+(require :nvrc.pack)
diff --git a/fnl/nvrc/macro/misc.fnl b/fnl/nvrc/macro/misc.fnl
deleted file mode 100644
index cde60ce..0000000
--- a/fnl/nvrc/macro/misc.fnl
+++ /dev/null
@@ -1 +0,0 @@
-{:disable-builtins! #(vim.tbl_map #(tset vim.g (.. :loaded_ $) 1) $)}
diff --git a/fnl/nvrc/options.fnl b/fnl/nvrc/options.fnl
index abd0a7b..d7ee172 100644
--- a/fnl/nvrc/options.fnl
+++ b/fnl/nvrc/options.fnl
@@ -1,5 +1,4 @@
 (import-macros {: set! : setv!} :nvrc.macro.set)
-(local {: disable-builtins!} (require :nvrc.macro.misc))
 
 (set! clipboard :unnamedplus)
 
@@ -8,7 +7,8 @@
 (set! cmdheight 1)
 (set! number)
 (set! shortmess+ :sI)
-(set! signcolumn :yes)
+(set! signcolumn "auto:1-9")
+(set! scrolloff 3)
 (set! splitbelow)
 (set! splitright)
 (set! termguicolors)
@@ -16,8 +16,8 @@
 
 ; Style
 (set! expandtab)
-(set! tabstop 8)
-(set! shiftwidth 2)
+(set! tabstop 2)
+(set! shiftwidth 0)
 (set! smartindent)
 (set! list)
 (set! listchars {:tab ">-" :extends ">" :precedes "<" :trail "*" :nbsp "+"})
@@ -31,21 +31,28 @@
 (set! undofile)
 (set! whichwrap+ "<>[]hl")
 
-(disable-builtins! [:2html_plugin
-                    :getscript
-                    :getscriptPlugin
-                    :gzip
-                    :logipat
-                    :netrw
-                    :netrwPlugin
-                    :netrwSettings
-                    :netrwFileHandlers
-                    :matchit
-                    :tar
-                    :tarPlugin
-                    :rrhelper
-                    :spellfile_plugin
-                    :vimball
-                    :vimballPlugin
-                    :zip
-                    :zipPlugin])
+(let [built-ins [:netrw
+                 :netrwPlugin
+                 :netrwSettings
+                 :netrwFileHandlers
+                 :gzip
+                 :zip
+                 :zipPlugin
+                 :tar
+                 :tarPlugin
+                 :getscript
+                 :getscriptPlugin
+                 :vimball
+                 :vimballPlugin
+                 :2html_plugin
+                 :logipat
+                 :rrhelper
+                 :spellfile_plugin
+                 :matchit]
+      providers [:perl :python :python3 :node :ruby]]
+     (each [_ v (ipairs built-ins)]
+      (let [b (.. :loaded_ v)]
+       (tset vim.g b 1)))
+     (each [_ v (ipairs providers)]
+      (let [p (.. :loaded_ v :_provider)]
+       (tset vim.g p 0))))
diff --git a/fnl/nvrc/pack.fnl b/fnl/nvrc/pack.fnl
index 384def4..0bad77a 100644
--- a/fnl/nvrc/pack.fnl
+++ b/fnl/nvrc/pack.fnl
@@ -4,20 +4,17 @@
 (pack! :rktjmp/hotpot.nvim)
 (pack! :lewis6991/impatient.nvim)
 (pack! :nvim-lua/plenary.nvim {:module :plenary})
-(pack! :nathom/filetype.nvim {:req :filetype})
 
-(pack! :nanotech/jellybeans.vim)
+(pack! :nanotech/jellybeans.vim {:config "require('nvrc.colors').apply('jellybeans')"})
 (pack! :feline-nvim/feline.nvim {:req :feline})
 (pack! :lukas-reineke/indent-blankline.nvim {:req :blankline :defer :indent-blankline.nvim})
 (pack! :NvChad/nvim-colorizer.lua {:init :colorizer :cmd :ColorizerToggle})
 (pack! :nvim-treesitter/nvim-treesitter {:req :treesitter
-                                         :run ":TSUpdate"
-                                         :requires [(pack :p00f/nvim-ts-rainbow {:after :nvim-treesitter})
-                                                    (pack :nvim-treesitter/nvim-treesitter-refactor {:after :nvim-treesitter})
-                                                    (pack :nvim-treesitter/nvim-treesitter-textobjects {:after :nvim-treesitter})
-                                                    (pack :JoosepAlviste/nvim-ts-context-commentstring {:after :nvim-treesitter})]})
-(pack! :lewis6991/gitsigns.nvim {:req :gitsigns :defer :gitsigns.nvim})
-(pack! :sindrets/diffview.nvim {:req :diffview :cmd [:DiffviewOpen :DiffviewFileHistory] :module_pattern [:diffview :diffview.*]})
+                                          :run ":TSUpdate"
+                                          :requires [(pack :p00f/nvim-ts-rainbow {:after :nvim-treesitter})
+                                                     (pack :nvim-treesitter/nvim-treesitter-refactor {:after :nvim-treesitter})
+                                                     (pack :nvim-treesitter/nvim-treesitter-textobjects {:after :nvim-treesitter})
+                                                     (pack :JoosepAlviste/nvim-ts-context-commentstring {:after :nvim-treesitter})]})
 (pack! :Pocco81/TrueZen.nvim {:cmd [:TZMinimalist :TZFocus :TZAtaraxis]})
 (pack! :stefandtw/quickfix-reflector.vim {:ft :qf :defer :quickfix-reflector.vim})
 
@@ -26,21 +23,16 @@
 (pack! :antoinemadec/FixCursorHold.nvim)
 (pack! :numToStr/Comment.nvim {:module :Comment :init :Comment})
 (pack! :lewis6991/spaceless.nvim {:init :spaceless :defer :spaceless.nvim})
-(pack! :tpope/vim-surround {:defer :vim-surround})
-(pack! :junegunn/vim-easy-align {:keys "<Plug>EasyAlign"})
-(pack! :monaqa/dial.nvim {:keys [:<C-a> :<C-x>]})
 (pack! :ggandor/lightspeed.nvim)
 (pack! :nacro90/numb.nvim {:init :numb})
 (pack! :ibhagwan/fzf-lua {:req :fzf :module :fzf-lua :cmd :FzfLua})
-(pack! :andymass/vim-matchup {:defer :vim-matchup})
 (pack! :ThePrimeagen/harpoon {:req :harpoon :defer :harpoon})
-(pack! :gpanders/editorconfig.nvim)
+(pack! :gpanders/editorconfig.nvim {:event :BufRead})
 
 (pack! :neovim/nvim-lspconfig {:req :lspconfig
                                :requires [(pack :hrsh7th/cmp-nvim-lsp {:after :nvim-cmp})
                                           (pack :ray-x/lsp_signature.nvim {:req :lsp_signature :after :nvim-lspconfig})]})
 
 (pack! :simrat39/rust-tools.nvim {:init :rust-tools :ft :rust})
-(pack! :eraserhd/parinfer-rust {:ft [:fennel :clojure :query :lisp] :run "cargo build --release"})
 
 (unpack!)
diff --git a/fnl/nvrc/packs/filetype.fnl b/fnl/nvrc/packs/filetype.fnl
deleted file mode 100644
index d24d322..0000000
--- a/fnl/nvrc/packs/filetype.fnl
+++ /dev/null
@@ -1,3 +0,0 @@
-(local {: setup} (require :filetype))
-
-(setup {:overrides {:complex {:.*neomutt-.* :mail}}})
diff --git a/init.lua b/init.lua
index c14a467..26059bd 100644
--- a/init.lua
+++ b/init.lua
@@ -1,7 +1,9 @@
 local fmt = string.format
 local run = vim.api.nvim_command
 
-vim.opt.shadafile = "NONE"
+-- Enable opt-in filetype.lua: https://github.com/neovim/neovim/pull/16600
+vim.g.do_filetype_lua = 1
+vim.g.did_load_filetypes = 0
 
 local function ensure(user, repo)
   local install_path = fmt("%s/site/pack/packer/start/%s", vim.fn.stdpath("data"), repo)
@@ -13,11 +15,10 @@ local function ensure(user, repo)
 end
 
 ensure("lewis6991", "impatient.nvim")
-require("impatient")
-
 ensure("wbthomason", "packer.nvim")
-
 ensure("rktjmp", "hotpot.nvim")
+
+require("impatient").enable_profile()
 require("hotpot").setup { provide_require_fennel = true }
 
 require("nvrc.ignite")