more
This commit is contained in:
+13
-11
@@ -1,19 +1,21 @@
|
|||||||
require("bufferline").setup ({
|
require("bufferline").setup ({
|
||||||
options = {
|
options = {
|
||||||
diagnostics = "nvim_lsp",
|
diagnostics = "coc",
|
||||||
always_show_bufferline = true,
|
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
||||||
diagnostics_indicator = function(_, _, diag)
|
local s = " "
|
||||||
local icons = LazyVim.config.icons.diagnostics
|
for e, n in pairs(diagnostics_dict) do
|
||||||
local ret = (diag.error and icons.Error .. diag.error .. " " or "")
|
local sym = e == "error" and " "
|
||||||
.. (diag.warning and icons.Warn .. diag.warning or "")
|
or (e == "warning" and " " or " ")
|
||||||
return vim.trim(ret)
|
s = s .. n .. sym
|
||||||
|
end
|
||||||
|
return s
|
||||||
end,
|
end,
|
||||||
|
always_show_bufferline = true,
|
||||||
offsets = {
|
offsets = {
|
||||||
{
|
{
|
||||||
filetype = "neo-tree",
|
filetype = "NvimTree",
|
||||||
text = "Neo-tree",
|
text = "Explorer",
|
||||||
highlight = "Directory",
|
text_align = "center",
|
||||||
text_align = "left",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
filetype = "snacks_layout_box",
|
filetype = "snacks_layout_box",
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
require'nvim-treesitter.configs'.setup {
|
require'nvim-treesitter.configs'.setup {
|
||||||
ensure_installed = "all",
|
ensure_installed = "all",
|
||||||
sync_install = false,
|
sync_install = true,
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
disable = function(lang, buf)
|
|
||||||
local max_filesize = 100 * 1024
|
|
||||||
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
|
||||||
if ok and stats and stats.size > max_filesize then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
additional_vim_regex_highlighting = false,
|
additional_vim_regex_highlighting = false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user