diff --git a/files/.config/nvim/fnl/init.fnl b/files/.config/nvim/fnl/init.fnl index dd64433..59caef1 100644 --- a/files/.config/nvim/fnl/init.fnl +++ b/files/.config/nvim/fnl/init.fnl @@ -10,6 +10,11 @@ (macro make-errors-epic [f] `(xpcall #,f #(a.println (fennel.traceback $1)))) + +(when (vim.fn.has "termguicolors") + (se termguicolors true)) + + (make-errors-epic (require "plugins")) (make-errors-epic (require "plugins.lsp")) @@ -54,8 +59,6 @@ (se shell "bash") (se background "dark") -(when (vim.fn.has "termguicolors") - (se termguicolors true)) (vim.cmd "colorscheme gruvbox") (vim-let &t_ut "") @@ -78,8 +81,8 @@ ; hide empty line ~'s (utils.highlight :EndOfBuffer {:bg "NONE" :fg colors.dark0}) - (utils.highlight :LineNr {:bg "NONE"}) + (utils.highlight-add :Pmenu {:bg colors.dark0_hard}) (utils.highlight-add :PmenuSel {:bg colors.bright_aqua}) (utils.highlight-add :PmenuSbar {:bg colors.dark0_hard}) diff --git a/files/.config/nvim/fnl/plugins.fnl b/files/.config/nvim/fnl/plugins.fnl index f6d8d6f..f7e3945 100644 --- a/files/.config/nvim/fnl/plugins.fnl +++ b/files/.config/nvim/fnl/plugins.fnl @@ -1,5 +1,5 @@ (module plugins - {require {utils utils} + {require {} require-macros [macros]}) (use-macro @@ -42,9 +42,8 @@ :tpope/vim-fugitive {} :preservim/nerdcommenter {} - :godlygeek/tabular {} ; :Tab /regex can align code on occurrences of the given regex. I.e. :Tab /= aligns all = signs in a block. + :godlygeek/tabular {:cmd ["Tabularize"]} ; :Tab /regex can align code on occurrences of the given regex. I.e. :Tab /= aligns all = signs in a block. :tpope/vim-surround {} - :christoomey/vim-tmux-navigator {} ; good integration with tmux pane switching :nathanaelkane/vim-indent-guides {} ; Can be toggled using ig (intent-guides) ; to select current word. to select next occurrence. @@ -66,7 +65,7 @@ :Olical/conjure {} - :tami5/compe-conjure {} + :tami5/compe-conjure {:requires [:Olical/conjure]} :machakann/vim-highlightedyank {} :ciaranm/detectindent {:mod "plugins.detect-indent"} @@ -85,7 +84,7 @@ :kevinoid/vim-jsonc {} - :ap/vim-css-color {} + :norcalli/nvim-colorizer.lua {:mod "plugins.nvim-colorizer"} :pangloss/vim-javascript {} ; syntax highlighting JS :ianks/vim-tsx {} :leafgarland/typescript-vim {} @@ -105,8 +104,7 @@ :simrat39/rust-tools.nvim {:ft ["rust"]} :ray-x/lsp_signature.nvim {} - :bakpakin/fennel.vim {} - :tjdevries/nlua.nvim {}) + :bakpakin/fennel.vim {}) ; >>> diff --git a/files/.config/nvim/fnl/plugins/nvim-colorizer.fnl b/files/.config/nvim/fnl/plugins/nvim-colorizer.fnl new file mode 100644 index 0000000..95dfa71 --- /dev/null +++ b/files/.config/nvim/fnl/plugins/nvim-colorizer.fnl @@ -0,0 +1,16 @@ +(module plugins.nvim-colorizer + {require {colorizer colorizer}}) + + +; this really shouldn't be necessary,.. but it is +(set vim.o.termguicolors true) + +(colorizer.setup + ["*"] + {:RGB true + :RRGGBB true + :names true + :RRGGBBAA true + :rgb_fn true + :hsl_fn true + :mode "background"}) diff --git a/files/.config/nvim/fnl/plugins/telescope.fnl b/files/.config/nvim/fnl/plugins/telescope.fnl index 6f51087..8c12a3f 100644 --- a/files/.config/nvim/fnl/plugins/telescope.fnl +++ b/files/.config/nvim/fnl/plugins/telescope.fnl @@ -3,8 +3,8 @@ telescope telescope actions telescope.actions}}) -(print "initializing telescope") - -(telescope.setup {}) +(telescope.setup + {:defaults {:mappings {:i {: actions.close}}}}) + (utils.keymap :n : ":Telescope find_files") diff --git a/files/.config/nvim/init.lua b/files/.config/nvim/init.lua index 0649653..4eea0a1 100644 --- a/files/.config/nvim/init.lua +++ b/files/.config/nvim/init.lua @@ -8,7 +8,8 @@ function ensure(user, repo) -- Ensures a given github.com/USER/REPO is cloned in the pack/packer/start directory. local install_path = string.format("%s/packer/start/%s", pack_path, repo, repo) if vim.fn.empty(vim.fn.glob(install_path)) > 0 then - vim.api.nvim_command(string.format("!git clone https://github.com/%s/%s %s", user, repo, install_path)) + --vim.api.nvim_command(string.format("!git clone https://github.com/%s/%s %s", user, repo, install_path)) + vim.fn.system({"git", "clone", "https://github.com/" .. user .. "/" .. repo, install_path}) vim.api.nvim_command(string.format("packadd %s", repo)) end end diff --git a/files/nix-stuff/nixpkgs/modules/base.nix b/files/nix-stuff/nixpkgs/modules/base.nix index 68b90cb..d5284c4 100644 --- a/files/nix-stuff/nixpkgs/modules/base.nix +++ b/files/nix-stuff/nixpkgs/modules/base.nix @@ -32,7 +32,7 @@ in vim = "nvim"; cxmonad = "cd ~/.xmonad && nvim /home/leon/.xmonad/lib/Config.hs && cd -"; cnix = "cd ~/nixpkgs/ && nvim home.nix && cd -"; - cvim = "cd ~/.config/nvim/ && nvim init.vim && cd -"; + cvim = "cd ~/.config/nvim/ && nvim fnl/init.fnl && cd -"; ra = "ranger";