Update UI

This commit is contained in:
Ryan 2023-11-11 11:45:14 +08:00
parent 33f5805bee
commit 284511be86
Signed by: juan
GPG Key ID: 807ECD28A698D245
8 changed files with 44 additions and 88 deletions

View File

@ -18,6 +18,7 @@ local opts = {
}
local plugins = {
-- main UI
{
"ellisonleao/gruvbox.nvim",
lazy = false,
@ -33,22 +34,21 @@ local plugins = {
require("plugins.statusline")
end
},
-- TS, LSP, Completion
{
"williamboman/mason.nvim"
},
{
"nvim-treesitter/nvim-treesitter-context",
dependencies = {
"nvim-treesitter/nvim-treesitter"
},
"nvim-treesitter/nvim-treesitter",
config = function()
require("plugins.treesitter")
end
},
{
"HiPhish/nvim-ts-rainbow2",
"nvim-treesitter/nvim-treesitter-context",
dependencies = {
"nvim-treesitter/nvim-treesitter",
config = function()
require("plugins.treesitter")
end
},
},
{
@ -110,15 +110,23 @@ local plugins = {
"jose-elias-alvarez/null-ls.nvim"
}
},
"machakann/vim-sandwich",
-- Code editing
{
"machakann/vim-sandwich",
keys = "s"
},
{
"numToStr/Comment.nvim",
event = "BufEnter",
config = function ()
keys = "g",
config = function()
require("Comment").setup()
end
},
"andymass/vim-matchup",
{
"andymass/vim-matchup",
event = "BufEnter"
},
{
"nvim-telescope/telescope.nvim",
dependencies = { 'nvim-lua/plenary.nvim' },
@ -126,13 +134,26 @@ local plugins = {
require("plugins.telescope")
end
},
{
"preservim/tagbar",
cmd = "TagbarToggle"
},
-- Eye candy UI
{
"winston0410/range-highlight.nvim",
event = "CmdlineEnter"
},
{
'simrat39/symbols-outline.nvim',
cmd = { 'SymbolsOutline', 'SymbolsOutlineOpen' },
opts = { autofold_depth = 12 }
},
{
'stevearc/dressing.nvim'
},
{
"lewis6991/gitsigns.nvim",
event = "BufEnter",
config = function()
require('gitsigns').setup()
end
}
}
@ -141,7 +162,7 @@ local vscode_plugins = {
{
"numToStr/Comment.nvim",
event = "BufEnter",
config = function ()
config = function()
require("Comment").setup()
end
},

View File

@ -35,18 +35,9 @@ map('i', ',', ',<c-g>u', { noremap = true })
map('i', '.', '.<c-g>u', { noremap = true })
map('i', '!', '!<c-g>u', { noremap = true })
map('i', '?', '?<c-g>u', { noremap = true })
-- plugin mappings
-- gitsigns
map('', '<leader>gs', ':Gitsigns toggle_signs<cr>', { silent = true })
-- toggle tagbar
map('', '<leader>tt', ':TagbarToggle<cr>', { silent = true })
-- toggle Hop
map('', '<leader>b', ':HopWordBC<cr>', { silent = true })
map('', '<leader>w', ':HopWordAC<cr>', { silent = true })
map('', '<leader>l', ':HopWordCurrentLine<cr>', { silent = true })
-- telescope stuff
-- symbols outline
map('n', '<leader>o', ':SymbolsOutline<cr>', { silent = true })
-- telescope
map('', '<leader>fd', ':Telescope fd<cr>', { silent = true })
map('', '<leader>tb', ':Telescope buffers<cr>', { silent = true })
map('', '<leader>bf', ':Telescope buffers<cr>', { silent = true })

View File

@ -1 +0,0 @@
vim.g.emmet_html5 = 1

View File

@ -1,33 +0,0 @@
require('gitsigns').setup {
-- signs
status_formatter = nil, -- Use default
numhl = false,
sign_priority = 10,
attach_to_untracked = false, -- fix gitsigns with yadm in ~
signs = {
add = {hl = "DiffAdd", text = "+", numhl = "GitSignsAddNr"},
change = {hl = "DiffChange", text = ">", numhl = "GitSignsChangeNr"},
changedelete = {
hl = "DiffChange",
text = "~",
numhl = "GitSignsChangeNr"
},
delete = {hl = "DiffDelete", text = "_", numhl = "GitSignsDeleteNr"},
topdelete = {
hl = "DiffDelete",
text = "",
numhl = "GitSignsDeleteNr"
}
},
-- yadm = {enable = true},
-- Current line blame
current_line_blame = true, -- Toggle with `:Gitsigns toggle_current_line_blame`
current_line_blame_opts = {
virt_text = true,
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
delay = 250,
ignore_whitespace = false
},
current_line_blame_formatter = '<author>, <author_time:%Y-%m-%d> - <summary>'
}

View File

@ -1,9 +0,0 @@
require("indent_blankline").setup {
buftype_exclude = {"terminal", "help", "packer", "NvimTree", "tagbar"},
char = "", -- also set as global env
space_char_blankline = ' ',
max_indent_increase = 2,
show_first_indent_level = false,
show_trailing_blankline_indent = false,
use_treesitter = true
}

View File

@ -30,7 +30,7 @@ vim.api.nvim_create_autocmd('LspAttach', {
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, opts)
vim.keymap.set({ 'n', 'v' }, '<space>ca', vim.lsp.buf.code_action, opts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts)
vim.keymap.set('n', '<space>f', function()
vim.keymap.set('n', '<space>fm', function()
vim.lsp.buf.format { async = true }
end, opts)
end,

View File

@ -0,0 +1 @@
require("symbols-outline").setup(opts)

View File

@ -1,4 +1,3 @@
local rainbow = require("ts-rainbow")
require("nvim-treesitter.configs").setup({
ensure_installed = { "lua" }, -- one of "all", "maintained" (parsers with maintainers), or a list of languages
highlight = {
@ -11,17 +10,4 @@ require("nvim-treesitter.configs").setup({
use_languagetree = true,
},
indent = { enable = true },
rainbow = {
enable = true,
strategy = rainbow.strategy['local'],
hlgroups = {
"TSRainbowYellow",
"TSRainbowBlue",
"TSRainbowOrange",
"TSRainbowGreen",
"TSRainbowViolet",
"TSRainbowCyan",
"TSRainbowRed",
},
},
})