nvim: fix indent highlighting
This commit is contained in:
parent
c759257ead
commit
b18beb9aca
4 changed files with 25 additions and 2 deletions
|
@ -4,5 +4,6 @@ return {
|
||||||
main = "ibl",
|
main = "ibl",
|
||||||
opts = {
|
opts = {
|
||||||
indent = { char = "┊" },
|
indent = { char = "┊" },
|
||||||
|
scope = { char = "│" },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ return {
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
"hrsh7th/cmp-nvim-lsp-signature-help",
|
"hrsh7th/cmp-nvim-lsp-signature-help",
|
||||||
{ "antosha417/nvim-lsp-file-operations", config = true },
|
{ "antosha417/nvim-lsp-file-operations", config = true },
|
||||||
{ "folke/neodev.nvim", opts = {} },
|
{ "folke/neodev.nvim", opts = {} },
|
||||||
},
|
},
|
||||||
|
|
|
@ -56,7 +56,7 @@ return {
|
||||||
{ name = "luasnip" }, -- snippets
|
{ name = "luasnip" }, -- snippets
|
||||||
{ name = "buffer" }, -- text within current buffer
|
{ name = "buffer" }, -- text within current buffer
|
||||||
{ name = "path" }, -- file system paths
|
{ name = "path" }, -- file system paths
|
||||||
{ name = "nvim_lsp_signature_help" }, -- function parameters
|
{ name = "nvim_lsp_signature_help" }, -- function parameters
|
||||||
}),
|
}),
|
||||||
|
|
||||||
-- configure lspkind for vs-code like pictograms in completion menu
|
-- configure lspkind for vs-code like pictograms in completion menu
|
||||||
|
|
|
@ -1,6 +1,28 @@
|
||||||
|
local function get_color(name, attr)
|
||||||
|
return vim.fn.synIDattr(vim.fn.synIDtrans(vim.fn.hlID(name)), attr):gsub('#','')
|
||||||
|
end
|
||||||
|
|
||||||
|
local function clamp(value)
|
||||||
|
return math.min(math.max(value, 0), 255)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function brightness(color, amount)
|
||||||
|
local num = tonumber(color, 16)
|
||||||
|
local r = (math.floor(num / 0x10000)) + amount
|
||||||
|
local g = (math.floor(num / 0x100) % 0x100) + amount
|
||||||
|
local b = (math.floor(num % 0x100)) + amount
|
||||||
|
return string.format("#%x", clamp(r) * 0x10000 + clamp(g) * 0x100 + clamp(b))
|
||||||
|
end
|
||||||
|
|
||||||
|
local function add_tweaks()
|
||||||
|
-- always set IblIndent to a slightly brighter version of the background color
|
||||||
|
vim.cmd('hi IblIndent guifg=' .. brightness(get_color('Normal', 'bg'), 20))
|
||||||
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'AlphaTechnolog/pywal.nvim',
|
'AlphaTechnolog/pywal.nvim',
|
||||||
config = function ()
|
config = function ()
|
||||||
vim.cmd('colorscheme pywal')
|
vim.cmd('colorscheme pywal')
|
||||||
|
add_tweaks()
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue