mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Compare commits
No commits in common. "cfc0089bb5f923084f5e8df4933cf7033364aa4d" and "e6f95cedb15eb9cc6f7ded15017fd4e4fb60e8af" have entirely different histories.
cfc0089bb5
...
e6f95cedb1
@ -110,11 +110,6 @@ local custom_attach = function(client, bufnr)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
-- required by nvim-ufo
|
|
||||||
capabilities.textDocument.foldingRange = {
|
|
||||||
dynamicRegistration = false,
|
|
||||||
lineFoldingOnly = true
|
|
||||||
}
|
|
||||||
|
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
|
|
||||||
|
|||||||
@ -1,23 +0,0 @@
|
|||||||
local builtin = require("statuscol.builtin")
|
|
||||||
local ffi = require("statuscol.ffidef")
|
|
||||||
local C = ffi.C
|
|
||||||
|
|
||||||
-- only show fold level up to this level
|
|
||||||
local fold_level_limit = 2
|
|
||||||
local function foldfunc(args)
|
|
||||||
local foldinfo = C.fold_info(args.wp, args.lnum)
|
|
||||||
if foldinfo.level > fold_level_limit then
|
|
||||||
return " "
|
|
||||||
end
|
|
||||||
|
|
||||||
return builtin.foldfunc(args)
|
|
||||||
end
|
|
||||||
|
|
||||||
require("statuscol").setup {
|
|
||||||
relculright = false,
|
|
||||||
segments = {
|
|
||||||
{ text = { "%s" }, click = "v:lua.ScSa" },
|
|
||||||
{ text = { builtin.lnumfunc, " " }, click = "v:lua.ScLa" },
|
|
||||||
{ text = { foldfunc, " " }, condition = { true, builtin.not_empty }, click = "v:lua.ScFa" },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@ -30,9 +30,10 @@ local handler = function(virtText, lnum, endLnum, width, truncate)
|
|||||||
return newVirtText
|
return newVirtText
|
||||||
end
|
end
|
||||||
|
|
||||||
require("ufo").setup {
|
local opts = {}
|
||||||
fold_virt_text_handler = handler,
|
opts["fold_virt_text_handler"] = handler
|
||||||
}
|
|
||||||
|
require("ufo").setup(opts)
|
||||||
|
|
||||||
vim.keymap.set("n", "zR", require("ufo").openAllFolds)
|
vim.keymap.set("n", "zR", require("ufo").openAllFolds)
|
||||||
vim.keymap.set("n", "zM", require("ufo").closeAllFolds)
|
vim.keymap.set("n", "zM", require("ufo").closeAllFolds)
|
||||||
|
|||||||
@ -156,7 +156,7 @@ local plugin_specs = {
|
|||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
cond = firenvim_not_active,
|
cond = firenvim_not_active,
|
||||||
config = function()
|
config = function()
|
||||||
require("config.lualine")
|
require("config.statusline")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -190,7 +190,15 @@ local plugin_specs = {
|
|||||||
"luukvbaal/statuscol.nvim",
|
"luukvbaal/statuscol.nvim",
|
||||||
opts = {},
|
opts = {},
|
||||||
config = function()
|
config = function()
|
||||||
require("config.nvim-statuscol")
|
local builtin = require("statuscol.builtin")
|
||||||
|
require("statuscol").setup {
|
||||||
|
relculright = true,
|
||||||
|
segments = {
|
||||||
|
{ text = { "%s" }, click = "v:lua.ScSa" },
|
||||||
|
{ text = { builtin.lnumfunc, " " }, click = "v:lua.ScLa" },
|
||||||
|
{ text = { builtin.foldfunc, " " }, condition = {true, builtin.not_empty}, click = "v:lua.ScFa" },
|
||||||
|
},
|
||||||
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -534,11 +542,6 @@ local plugin_specs = {
|
|||||||
require("config.fidget-nvim")
|
require("config.fidget-nvim")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"folke/lazydev.nvim",
|
|
||||||
ft = "lua", -- only load on lua files
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
require("lazy").setup {
|
require("lazy").setup {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user