add colorizer

This commit is contained in:
elkowar 2021-05-09 13:40:11 +02:00
parent ea0c5d9b78
commit 17c81c5a30
No known key found for this signature in database
GPG key ID: E321AD71B1D1F27F
6 changed files with 33 additions and 15 deletions

View file

@ -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})

View file

@ -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 <leader>ig (intent-guides)
; <C-n> to select current word. <C-n> 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 {})
; >>>

View file

@ -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"})

View file

@ -3,8 +3,8 @@
telescope telescope
actions telescope.actions}})
(print "initializing telescope")
(telescope.setup {})
(telescope.setup
{:defaults {:mappings {:i {:<esc> actions.close}}}})
(utils.keymap :n :<C-p> ":Telescope find_files<CR>")

View file

@ -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

View file

@ -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";