From 1f5e687a60f7b345994f3b77936c2684c1164190 Mon Sep 17 00:00:00 2001 From: juan Date: Sun, 3 Apr 2022 23:22:30 +0800 Subject: [PATCH] Huge update. various bug fixes --- lua/pluginList.lua | 46 +++++++++++++-------------------- lua/plugins/coq.lua | 2 +- lua/plugins/nvim-autopairs.lua | 4 ++- lua/plugins/nvim-colorizer.lua | 10 +++++++ lua/plugins/nvim-ts-rainbow.lua | 2 +- 5 files changed, 33 insertions(+), 31 deletions(-) create mode 100644 lua/plugins/nvim-colorizer.lua diff --git a/lua/pluginList.lua b/lua/pluginList.lua index fdd6417..839ed37 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -17,29 +17,24 @@ require('packer').init { } return require('packer').startup(function(use) - use {'wbthomason/packer.nvim', event = 'VimEnter'} + use {'wbthomason/packer.nvim', event = "VimEnter"} -- core UI use { - 'https://github.com/b4skyx/serenade', + 'b4skyx/serenade', after = 'packer.nvim', config = function() vim.g.serenade_enable_italic = 1 - vim.g.serenade_better_performance = 1 + vim.g.serenade_better_performance = 1 vim.cmd("colorscheme serenade") end } use {'kyazdani42/nvim-web-devicons', after = 'packer.nvim'} use { 'hoob3rt/lualine.nvim', - after = {'nvim-web-devicons'}, + after = {'serenade', 'nvim-web-devicons'}, config = function() require "plugins.statusline" end } - -- use { - -- 'RRethy/nvim-base16', - -- after = 'packer.nvim', - -- config = function() require "plugins.base16" end - -- } -- lsp stuff use {'neovim/nvim-lspconfig', event = "BufEnter"} @@ -52,15 +47,10 @@ return require('packer').startup(function(use) -- tree sitter use { 'nvim-treesitter/nvim-treesitter', - event = "VimEnter", + event = "UIEnter", config = function() require "plugins.treesitter" end, run = ':TSUpdate' } - use { - 'lewis6991/spellsitter.nvim', - after = "nvim-treesitter", - config = function() require('spellsitter').setup() end - } -- completer use { @@ -70,19 +60,19 @@ return require('packer').startup(function(use) run = ':COQdeps', config = function() require "plugins.coq" end } - -- use { - -- 'ms-jpq/coq.artifacts', - -- run = ':COQdeps', - -- after = 'coq_nvim', - -- branch = 'artifacts' - -- } + use { + 'ms-jpq/coq.artifacts', + after = 'coq_nvim', + branch = 'artifacts' + } use { 'ms-jpq/coq.thirdparty', branch = '3p', after = 'coq_nvim', config = function() require("coq_3p") { - {src = "nvimlua", short_name = "nLUA"}, {src = "repl"} + {src = "nvimlua", short_name = "nLUA"}, {src = "repl"}, + {src = "vimtex", short_name = "vTEX"} } end @@ -91,10 +81,10 @@ return require('packer').startup(function(use) use {"sbdchd/neoformat", cmd = "Neoformat"} use { "mattn/emmet-vim", - event = "FileType html,htmldjango,css,markdown", + ft = {'html', 'htmldjango', 'css', 'markdown'}, setup = function() require "plugins.emmet" end } - use {"machakann/vim-sandwich", event = "VimEnter"} + use {"machakann/vim-sandwich", event = "BufEnter"} use { "terrortylor/nvim-comment", @@ -103,7 +93,7 @@ return require('packer').startup(function(use) } use { "windwp/nvim-autopairs", - after = "coq_nvim", + event = "BufEnter", config = function() require("plugins.nvim-autopairs") end } @@ -132,7 +122,7 @@ return require('packer').startup(function(use) use {'preservim/tagbar', cmd = 'TagbarToggle'} use { 'phaazon/hop.nvim', - event = "VimEnter", + event = "UIEnter", as = 'hop', config = function() require'hop'.setup {keys = 'etovxqpdygfblzhckisuran'} @@ -168,8 +158,8 @@ return require('packer').startup(function(use) } use { 'norcalli/nvim-colorizer.lua', - cmd = 'ColorizerToggle', - config = function() require'colorizer'.setup() end + after = "packer.nvim", + config = function() require "plugins.nvim-colorizer" end } -- integrations diff --git a/lua/plugins/coq.lua b/lua/plugins/coq.lua index fd5ef09..122f51c 100644 --- a/lua/plugins/coq.lua +++ b/lua/plugins/coq.lua @@ -2,6 +2,6 @@ vim.g.coq_settings = { keymap = {recommended = false}, -- pre_select = true need a way to make tab enter auto_start = true, clients = {tabnine = {enabled = true}}, - display = {ghost_text = {enabled = false}, icons = {mode = "none"}} + display = {ghost_text = {enabled = false}, icons = {mode = "none"}, preview = {border = "NormalFloat"}} } vim.cmd('COQnow -s') diff --git a/lua/plugins/nvim-autopairs.lua b/lua/plugins/nvim-autopairs.lua index fd40cd0..5b0bde4 100644 --- a/lua/plugins/nvim-autopairs.lua +++ b/lua/plugins/nvim-autopairs.lua @@ -1,7 +1,9 @@ local remap = vim.api.nvim_set_keymap local npairs = require('nvim-autopairs') -npairs.setup({map_bs = false}) +npairs.setup({map_bs = true, map_cr = true}) + +vim.g.coq_settings = {keymap = {recommended = false}} -- these mappings are coq recommended mappings unrelated to nvim-autopairs remap('i', '', [[pumvisible() ? "" : ""]], diff --git a/lua/plugins/nvim-colorizer.lua b/lua/plugins/nvim-colorizer.lua new file mode 100644 index 0000000..f5ea9e5 --- /dev/null +++ b/lua/plugins/nvim-colorizer.lua @@ -0,0 +1,10 @@ +-- require'colorizer'.setup ({ +-- '*', +-- css = { +-- css = true, -- CSS rgb() and rgba() functions +-- css_fn = true -- CSS hsl() and hsla() functions +-- }, +-- html = {names = false} -- Disable parsing "names" like Blue or Gray +-- }) + +require 'colorizer'.setup() diff --git a/lua/plugins/nvim-ts-rainbow.lua b/lua/plugins/nvim-ts-rainbow.lua index d14965b..4c4ecc6 100644 --- a/lua/plugins/nvim-ts-rainbow.lua +++ b/lua/plugins/nvim-ts-rainbow.lua @@ -3,7 +3,7 @@ require'nvim-treesitter.configs'.setup { enable = true, extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean max_file_lines = 4096, -- Do not enable for files with more than n lines, int - colors = { "#84a0c6", "#a093c7", "#89b8c2"}, -- table of hex strings + colors = {"#c1bf89", "#87c095", "#82abbc", "#d39bb6", "#acb765"} -- table of hex strings -- termcolors = {} -- table of colour name strings } }