updates
This commit is contained in:
parent
6e34bf3039
commit
d573391bb2
3 changed files with 151 additions and 131 deletions
|
@ -5,20 +5,12 @@ vim.opt.listchars:append "eol:↴"
|
|||
vim.opt.listchars:append "tab: >"
|
||||
|
||||
local highlight = require('util').highlight
|
||||
-- Dull Version
|
||||
highlight("IndentBlanklineIndent1", { fg = "#915053", gui="nocombine" })
|
||||
highlight("IndentBlanklineIndent2", { fg = "#A27F3E", gui="nocombine" })
|
||||
highlight("IndentBlanklineIndent3", { fg = "#6B7F6E", gui="nocombine" })
|
||||
highlight("IndentBlanklineIndent4", { fg = "#5A747D", gui="nocombine" })
|
||||
highlight("IndentBlanklineIndent5", { fg = "#6B6282", gui="nocombine" })
|
||||
|
||||
-- highlight("SpecialKey", { fg = "#fff", gui = "nocombine" })
|
||||
-- highlight("Whitespace", { fg = "#fff", gui = "nocombine" })
|
||||
highlight("NonText", { fg = "#303030", gui = "nocombine" })
|
||||
|
||||
return {
|
||||
-- Add indentation guides even on blank lines
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
main = "ibl",
|
||||
-- Enable `lukas-reineke/indent-blankline.nvim`
|
||||
-- See `:help indent_blankline.txt`
|
||||
opts = {
|
||||
|
@ -28,18 +20,46 @@ return {
|
|||
-- char = '.',
|
||||
-- char = '¦',
|
||||
use_treesitter = true,
|
||||
char_highlight_list = {
|
||||
"IndentBlanklineIndent1",
|
||||
"IndentBlanklineIndent2",
|
||||
"IndentBlanklineIndent3",
|
||||
"IndentBlanklineIndent4",
|
||||
"IndentBlanklineIndent5",
|
||||
scope = {
|
||||
enabled = true,
|
||||
char = "┊",
|
||||
show_start = true,
|
||||
show_end = true,
|
||||
highlight = {
|
||||
"IndentBlanklineScope1",
|
||||
"IndentBlanklineScope2",
|
||||
"IndentBlanklineScope3",
|
||||
"IndentBlanklineScope4",
|
||||
"IndentBlanklineScope5",
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
indent = {
|
||||
char = '│',
|
||||
highlight = {
|
||||
"IndentBlanklineIndent1",
|
||||
"IndentBlanklineIndent2",
|
||||
"IndentBlanklineIndent3",
|
||||
"IndentBlanklineIndent4",
|
||||
"IndentBlanklineIndent5",
|
||||
},
|
||||
}
|
||||
},
|
||||
config = function(_, opts)
|
||||
local hooks = require "ibl.hooks"
|
||||
hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineIndent1", { fg = "#915053" })
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineIndent2", { fg = "#A27F3E" })
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineIndent3", { fg = "#6B7F6E" })
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineIndent4", { fg = "#5a74aa" })
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineIndent5", { fg = "#6B6282" })
|
||||
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineScope1", { fg = "#CB5D60" })
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineScope2", { fg = "#DEA93F" })
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineScope3", { fg = "#89B790" })
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineScope4", { fg = "#6289E5" })
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineScope5", { fg = "#917DC0" })
|
||||
end)
|
||||
|
||||
require('ibl').setup(opts)
|
||||
end
|
||||
}
|
||||
|
|
|
@ -1,92 +1,92 @@
|
|||
local auto = true
|
||||
local output = vim.fn.system({
|
||||
"which",
|
||||
"tree-sitter",
|
||||
"which",
|
||||
"tree-sitter",
|
||||
})
|
||||
if output == nil or output == "" then
|
||||
auto = false
|
||||
auto = false
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
dependencies = { "windwp/nvim-ts-autotag", "JoosepAlviste/nvim-ts-context-commentstring" },
|
||||
build = ":TSUpdate",
|
||||
event = "BufRead",
|
||||
cmd = {
|
||||
"TSBufDisable",
|
||||
"TSBufEnable",
|
||||
"TSBufToggle",
|
||||
"TSDisable",
|
||||
"TSEnable",
|
||||
"TSToggle",
|
||||
"TSInstall",
|
||||
"TSInstallInfo",
|
||||
"TSInstallSync",
|
||||
"TSModuleInfo",
|
||||
"TSUninstall",
|
||||
"TSUpdate",
|
||||
"TSUpdateSync",
|
||||
},
|
||||
opts = {
|
||||
-- https://github.com/nvim-treesitter/nvim-treesitter#supported-languages
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
dependencies = { "windwp/nvim-ts-autotag", "JoosepAlviste/nvim-ts-context-commentstring" },
|
||||
build = ":TSUpdate",
|
||||
event = "BufRead",
|
||||
cmd = {
|
||||
"TSBufDisable",
|
||||
"TSBufEnable",
|
||||
"TSBufToggle",
|
||||
"TSDisable",
|
||||
"TSEnable",
|
||||
"TSToggle",
|
||||
"TSInstall",
|
||||
"TSInstallInfo",
|
||||
"TSInstallSync",
|
||||
"TSModuleInfo",
|
||||
"TSUninstall",
|
||||
"TSUpdate",
|
||||
"TSUpdateSync",
|
||||
},
|
||||
opts = {
|
||||
-- https://github.com/nvim-treesitter/nvim-treesitter#supported-languages
|
||||
--ensure_installed = "all",
|
||||
ensure_installed = {
|
||||
"lua",
|
||||
"http",
|
||||
"json",
|
||||
"bash",
|
||||
"css",
|
||||
"diff",
|
||||
"dockerfile",
|
||||
"dot",
|
||||
"git_rebase",
|
||||
"gitattributes",
|
||||
"html",
|
||||
"java",
|
||||
"javascript",
|
||||
"jq",
|
||||
"jsdoc",
|
||||
"json5",
|
||||
"kotlin",
|
||||
"latex",
|
||||
"make",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"nix",
|
||||
"python",
|
||||
"regex",
|
||||
"rst",
|
||||
"rust",
|
||||
"scss",
|
||||
"sql",
|
||||
"terraform",
|
||||
"toml",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vue",
|
||||
"yaml",
|
||||
},
|
||||
auto_install = auto,
|
||||
highlight = {
|
||||
enable = true,
|
||||
use_languagetree = true,
|
||||
-- disable = function(_, bufnr) return vim.api.nvim_buf_line_count(bufnr) > 10000 end,
|
||||
-- additional_vim_regex_highlighting = false,
|
||||
},
|
||||
incremental_selection = { enable = true },
|
||||
ident = { enable = true },
|
||||
autotag = { enable = true },
|
||||
context_commentstring = { enable = true, enable_autocmd = false },
|
||||
rainbow = {
|
||||
enable = true,
|
||||
extended_mode = true,
|
||||
max_file_lines = nil,
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
end,
|
||||
},
|
||||
"nvim-treesitter/playground",
|
||||
ensure_installed = {
|
||||
"lua",
|
||||
"http",
|
||||
"json",
|
||||
"bash",
|
||||
"css",
|
||||
"diff",
|
||||
"dockerfile",
|
||||
"dot",
|
||||
"git_rebase",
|
||||
"gitattributes",
|
||||
"html",
|
||||
"java",
|
||||
"javascript",
|
||||
"jq",
|
||||
"jsdoc",
|
||||
"json5",
|
||||
"kotlin",
|
||||
"latex",
|
||||
"make",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"nix",
|
||||
"python",
|
||||
"regex",
|
||||
"rst",
|
||||
"rust",
|
||||
"scss",
|
||||
"sql",
|
||||
"terraform",
|
||||
"toml",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vue",
|
||||
"yaml",
|
||||
},
|
||||
auto_install = auto,
|
||||
highlight = {
|
||||
enable = true,
|
||||
use_languagetree = true,
|
||||
-- disable = function(_, bufnr) return vim.api.nvim_buf_line_count(bufnr) > 10000 end,
|
||||
-- additional_vim_regex_highlighting = false,
|
||||
},
|
||||
incremental_selection = { enable = true },
|
||||
ident = { enable = true },
|
||||
autotag = { enable = true },
|
||||
context_commentstring = { enable = true, enable_autocmd = false },
|
||||
rainbow = {
|
||||
enable = true,
|
||||
extended_mode = true,
|
||||
max_file_lines = nil,
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
end,
|
||||
},
|
||||
"nvim-treesitter/playground",
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue