From 4bd0009ae6003e916f786890e154ae66e71117da Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Fri, 9 Dec 2022 00:23:02 -0800 Subject: [PATCH] Some random changes --- fnl/plugin.fnl | 10 ++++++---- fnl/plugin/cmp.fnl | 2 -- init.fnl | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/fnl/plugin.fnl b/fnl/plugin.fnl index a62a260..26f4921 100644 --- a/fnl/plugin.fnl +++ b/fnl/plugin.fnl @@ -21,10 +21,7 @@ :auto_install true :highlight { :enable true :additional_vim_regex_highlighting false } - :indent { :enable true } - :rainbow { :enable true - :extended_mode true - :max_file_lines nil })) + :indent { :enable true })) ;; nightfox.nvim (colorscheme) (use! :EdenEast/nightfox.nvim @@ -77,6 +74,7 @@ (bind! :n :fm fzf.man_pages) (bind! :n :fe fzf.diagnostics_document) (bind! :n :fE fzf.diagnostics_workspace) + (bind! :n :d fzf.loclist) (bind! :n :fp fzf.spell_suggest) (bind! :n :i fzf.files) (bind! :n :z= fzf.spell_suggest) @@ -191,6 +189,10 @@ :dcampos/cmp-snippy ] :config (module-fn! :plugin.cmp :configure)) + ;; guess style from buffer + (use! :NMAC427/guess-indent.nvim + :config #(setup! :guess-indent :auto_cmd true)) + ;; lspconfig (use! :neovim/nvim-lspconfig :after [ :cmp-nvim-lsp diff --git a/fnl/plugin/cmp.fnl b/fnl/plugin/cmp.fnl index 3a37d7c..889108f 100644 --- a/fnl/plugin/cmp.fnl +++ b/fnl/plugin/cmp.fnl @@ -59,8 +59,6 @@ { :name "treesitter" :priority 1 :group 2 } { :name "buffer" :priority 0 :group 3 } { :name "path" :priority 0 :group 4 }] - :view { - :entries { :name "custom" :selection_order "near_cursor" }} :sorting { :priority_weight 2 :comparators [ diff --git a/init.fnl b/init.fnl index 3920d0f..405d6a7 100644 --- a/init.fnl +++ b/init.fnl @@ -59,13 +59,13 @@ ;; Remove trailing whitespace (fn remove-trailing-whitespace [] "Remove trailing whitespace from the whole file." - (let [res (pcall vim.cmd "%s/ \\+$//gc")] + (let [res (pcall vim.cmd "%s/ \\+$//")] (vim.cmd.nohlsearch) (when (not res) (print "File is clean")))) (vim.api.nvim_create_user_command :RemoveTrailingWhitespace remove-trailing-whitespace {}) -(bind! :n :ws remove-trailing-whitespace) +(hook! [ :BufWritePre ] "*" remove-trailing-whitespace) ;; Spell keybindings (bind! :n :l (fn []