update blankline and formatter.

This commit is contained in:
juan 2021-09-14 19:58:30 +08:00
parent 44eda22d9b
commit bff6f5e613
3 changed files with 139 additions and 136 deletions

View File

@ -1,6 +1,6 @@
-- Core Settings -- Core Settings
local opt = vim.o local opt = vim.o
local global = vim.g
-- look and feel -- look and feel
opt.relativenumber = true opt.relativenumber = true
@ -9,6 +9,7 @@ opt.showmode = false
opt.scrolloff = 10 opt.scrolloff = 10
opt.ruler = true opt.ruler = true
opt.termguicolors = true opt.termguicolors = true
opt.tabstop = 2
opt.shiftwidth = 2 opt.shiftwidth = 2
-- controlling -- controlling
@ -19,3 +20,7 @@ opt.mouse = "i"
-- completion for lua -- completion for lua
opt.completeopt = 'menuone,noselect' opt.completeopt = 'menuone,noselect'
-- neoformat settings.
global.neoformat_basic_format_align = 1
global.neoformat_basic_format_trim = 1

View File

@ -2,147 +2,147 @@
vim.cmd [[packadd packer.nvim]] vim.cmd [[packadd packer.nvim]]
require('packer').init { require('packer').init {
display = { display = {
open_fn = function() open_fn = function()
return require("packer.util").float {border = "single"} return require("packer.util").float {border = "single"}
end, end,
prompt_border = "single" prompt_border = "single"
}, },
git = { git = {
clone_timeout = 600 -- Timeout, in seconds, for git clones clone_timeout = 600 -- Timeout, in seconds, for git clones
}, },
auto_clean = true, auto_clean = true,
compile_on_sync = true compile_on_sync = true
-- auto_reload_compiled = true -- auto_reload_compiled = true
} }
return require('packer').startup(function(use) return require('packer').startup(function(use)
use {'wbthomason/packer.nvim', event = 'VimEnter'} use {'wbthomason/packer.nvim', event = 'VimEnter'}
-- core UI -- core UI
use {'kyazdani42/nvim-web-devicons', after = 'packer.nvim'} use {'kyazdani42/nvim-web-devicons', after = 'packer.nvim'}
use { use {
'hoob3rt/lualine.nvim', 'hoob3rt/lualine.nvim',
after = 'nvim-web-devicons', after = 'nvim-web-devicons',
config = function() require "plugins.statusline" end config = function() require "plugins.statusline" end
} }
use { use {
'RRethy/nvim-base16', 'RRethy/nvim-base16',
event = 'VimEnter', event = 'VimEnter',
config = function() require "plugins.base16" end config = function() require "plugins.base16" end
} }
-- lsp stuff -- lsp stuff
use { use {
'nvim-treesitter/nvim-treesitter', 'nvim-treesitter/nvim-treesitter',
event = 'VimEnter', event = 'VimEnter',
config = function() require "plugins.treesitter" end, config = function() require "plugins.treesitter" end,
run = ':TSUpdate' run = ':TSUpdate'
} }
use { use {
'lewis6991/spellsitter.nvim', 'lewis6991/spellsitter.nvim',
after = "nvim-treesitter", after = "nvim-treesitter",
config = function() require('spellsitter').setup() end config = function() require('spellsitter').setup() end
} }
use {'neovim/nvim-lspconfig', after = "coq_nvim"} use {'neovim/nvim-lspconfig', after = "coq_nvim"}
use { use {
'kabouzeid/nvim-lspinstall', 'kabouzeid/nvim-lspinstall',
config = function() require "plugins.lspinstall" end, config = function() require "plugins.lspinstall" end,
after = 'nvim-lspconfig' after = 'nvim-lspconfig'
} }
use { use {
'ms-jpq/coq_nvim', 'ms-jpq/coq_nvim',
branch = 'coq', branch = 'coq',
event = 'BufEnter', event = 'BufEnter',
config = function() require "plugins.coq" end config = function() require "plugins.coq" end
} }
use {'ms-jpq/coq.artifacts', after = 'coq_nvim', branch = 'artifacts'} use {'ms-jpq/coq.artifacts', after = 'coq_nvim', branch = 'artifacts'}
-- formating and editing -- formating and editing
use {"sbdchd/neoformat", cmd = "Neoformat"} use {"sbdchd/neoformat", cmd = "Neoformat"}
use { use {
"mattn/emmet-vim", "mattn/emmet-vim",
event = "FileType html,css", event = "FileType html,css",
setup = function() require "plugins.emmet" end setup = function() require "plugins.emmet" end
} }
use {"machakann/vim-sandwich", event = "BufRead"} use {"machakann/vim-sandwich", event = "BufRead"}
use { use {
"terrortylor/nvim-comment", "terrortylor/nvim-comment",
config = function() require('nvim_comment').setup() end, config = function() require('nvim_comment').setup() end,
cmd = "CommentToggle" cmd = "CommentToggle"
} }
use { use {
"windwp/nvim-autopairs", "windwp/nvim-autopairs",
after = "coq_nvim", after = "coq_nvim",
config = function() require("plugins.nvim-autopairs") end config = function() require("plugins.nvim-autopairs") end
} }
-- navigation -- navigation
use { use {
'kyazdani42/nvim-tree.lua', 'kyazdani42/nvim-tree.lua',
cmd = 'NvimTreeToggle', cmd = 'NvimTreeToggle',
requires = 'kyazdani42/nvim-web-devicons' requires = 'kyazdani42/nvim-web-devicons'
} }
use { use {
"vimwiki/vimwiki", "vimwiki/vimwiki",
cmd = "VimwikiIndex", cmd = "VimwikiIndex",
setup = function() require "plugins.vimwiki" end setup = function() require "plugins.vimwiki" end
} }
use { use {
'andymass/vim-matchup', 'andymass/vim-matchup',
after = 'nvim-treesitter', after = 'nvim-treesitter',
config = function() require "plugins.matchup" end config = function() require "plugins.matchup" end
} }
use { use {
'nvim-telescope/telescope.nvim', 'nvim-telescope/telescope.nvim',
requires = {{'nvim-lua/plenary.nvim'}}, requires = {{'nvim-lua/plenary.nvim'}},
cmd = 'Telescope' cmd = 'Telescope'
} }
use { use {
'phaazon/hop.nvim', 'phaazon/hop.nvim',
event = "BufRead", event = "BufRead",
as = 'hop', as = 'hop',
config = function() config = function()
require'hop'.setup {keys = 'etovxqpdygfblzhckisuran'} require'hop'.setup {keys = 'etovxqpdygfblzhckisuran'}
end end
} }
-- eye-candy -- eye-candy
use { use {
'sunjon/shade.nvim', 'sunjon/shade.nvim',
event = "BufAdd", event = "BufAdd",
config = function() require "plugins.shade" end config = function() require "plugins.shade" end
} }
use { use {
"lukas-reineke/indent-blankline.nvim", "lukas-reineke/indent-blankline.nvim",
after = {"nvim-treesitter", "nvim-base16"}, after = {"nvim-treesitter", "nvim-base16"},
config = function() require "plugins.indent-blankline" end config = function() require "plugins.indent-blankline" end
} }
use { use {
'lewis6991/gitsigns.nvim', 'lewis6991/gitsigns.nvim',
requires = {'nvim-lua/plenary.nvim'}, requires = {'nvim-lua/plenary.nvim'},
config = function() require('gitsigns').setup() end config = function() require('gitsigns').setup() end
} }
use { use {
'p00f/nvim-ts-rainbow', 'p00f/nvim-ts-rainbow',
after = "nvim-treesitter", after = "nvim-treesitter",
config = function() require "plugins.nvim-ts-rainbow" end config = function() require "plugins.nvim-ts-rainbow" end
} }
use { use {
'winston0410/range-highlight.nvim', 'winston0410/range-highlight.nvim',
event = "BufRead", event = "BufRead",
config = function() require("range-highlight").setup {} end, config = function() require("range-highlight").setup {} end,
requires = 'winston0410/cmd-parser.nvim' requires = 'winston0410/cmd-parser.nvim'
} }
use { use {
'norcalli/nvim-colorizer.lua', 'norcalli/nvim-colorizer.lua',
event = "BufRead", event = "BufRead",
config = function() require'colorizer'.setup() end config = function() require'colorizer'.setup() end
} }
-- integrations -- integrations
use {'michaelb/sniprun', run = 'bash ./install.sh', cmd = "SnipRun"} use {'michaelb/sniprun', run = 'bash ./install.sh', cmd = "SnipRun"}
use {"tpope/vim-fugitive", cmd = "G"} use {"tpope/vim-fugitive", cmd = "G"}
end) end)

View File

@ -1,7 +1,5 @@
require("indent_blankline").setup { require("indent_blankline").setup {
buftype_exclude = {"terminal", "help", "packer"}, buftype_exclude = {"terminal", "help", "packer"},
indent_blankline_buftype_exclude = {"terminal"}, char = "",
indentLine_enabled = 1,
indent_blankline_char = "",
show_current_context = true show_current_context = true
} }