mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-22 08:53:31 +02:00
add: update config
This commit is contained in:
parent
3100854e08
commit
76117ededa
20 changed files with 245 additions and 176 deletions
|
@ -21,22 +21,19 @@
|
|||
"mason-lspconfig.nvim": { "branch": "main", "commit": "2ba17cecfde8b8c7c7c287909a1e4de895223df6" },
|
||||
"mason-null-ls.nvim": { "branch": "main", "commit": "e270134d83ba59425edc53356c6fd337b61bb8dd" },
|
||||
"mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
|
||||
"mini.animate": { "branch": "main", "commit": "82519630b2760ffc516ebc387bef632f9c07b9f5" },
|
||||
"mini.indentscope": { "branch": "main", "commit": "cf07f19e718ebb0bcc5b00999083ce11c37b8d40" },
|
||||
"neoscroll.nvim": { "branch": "master", "commit": "21d52973bde32db998fc8b6590f87eb3c3c6d8e4" },
|
||||
"noice.nvim": { "branch": "main", "commit": "0cbe3f88d038320bdbda3c4c5c95f43a13c3aa12" },
|
||||
"none-ls-extras.nvim": { "branch": "main", "commit": "4d1b26b963edb82c45ed261d988f9e72253c3469" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "18910d09d21d7df339805343bfe4a2b2e41c057b" },
|
||||
"nui.nvim": { "branch": "main", "commit": "a0fd35fcbb4cb479366f1dc5f20145fd718a3733" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "dbfc1c34bed415906395db8303c71039b3a3ffb4" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "97dc716fc914c46577a4f254035ebef1aa72558a" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "7aa3f71932c419d716290e132cacbafbaf5bea1c" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "cf3dd4a290084a868fac0e2e876039321d57111c" },
|
||||
"nvim-material-icon": { "branch": "main", "commit": "602088c2682e61cbebd7191de7dc88bfa90c6890" },
|
||||
"nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" },
|
||||
"nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" },
|
||||
"nvim-scrollview": { "branch": "main", "commit": "c29c5f69d37040a1fac88cbea7f5e6f06f0aff4d" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "85c502e9076d9c82e2f04addabb3614846ae7558" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "ddd1d6eb21c45433bdc65cc8015f2457998f2bf2" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "f197a15b0d1e8d555263af20add51450e5aaa1f0" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "734ebad31c81c6198dfe102aa23280937c937c42" },
|
||||
|
@ -48,11 +45,10 @@
|
|||
"promise-async": { "branch": "main", "commit": "38a4575da9497326badd3995e768b4ccf0bb153e" },
|
||||
"smart-splits.nvim": { "branch": "master", "commit": "f6fcb79527872e9330c554915af2ca511c388390" },
|
||||
"statuscol.nvim": { "branch": "main", "commit": "d954893262a57a92e46edd87de67e2b3fe72305e" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "b22e6f6896cd64b109bd0807a24098d225d5fb49" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "1bb28df3cfc241b961331f00dcb8d5b45fe3e4f0" },
|
||||
"toggleterm.nvim": { "branch": "main", "commit": "193786e0371e3286d3bc9aa0079da1cd41beaa62" },
|
||||
"vim-illuminate": { "branch": "master", "commit": "305bf07b919ac526deb5193280379e2f8b599926" },
|
||||
"vim-startuptime": { "branch": "master", "commit": "97a88e688482a09c3c4b777d07b509b328a5ec29" },
|
||||
"vim-visual-multi": { "branch": "master", "commit": "1c9207b28c8898ab01b54e6d6b61b0b820a814bc" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "ce741eb559c924d72e3a67d2189ad3771a231414" },
|
||||
"yanky.nvim": { "branch": "main", "commit": "9268018e92d02650a94e39dd5f5903c542f7ea11" }
|
||||
"which-key.nvim": { "branch": "main", "commit": "ce741eb559c924d72e3a67d2189ad3771a231414" }
|
||||
}
|
|
@ -16,3 +16,9 @@ local term_program = vim.fn.getenv("TERM_PROGRAM")
|
|||
if term_program == "WezTerm" then
|
||||
vim.cmd('silent !wezterm cli set-tab-title "' .. _get_folder_name() .. '"')
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd("ExitPre", {
|
||||
group = vim.api.nvim_create_augroup("Exit", { clear = true }),
|
||||
command = "set guicursor=n-v-c:block,i-ci-ve:ver25,r-cr:hor20,o:hor50,a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor,sm:block-blinkwait175-blinkoff150-blinkon175,a:ver90",
|
||||
desc = "Set cursor back to beam when leaving Neovim.",
|
||||
})
|
||||
|
|
|
@ -30,7 +30,7 @@ vim.g.pcode_header1 = {
|
|||
-- " █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ █▄█▄▄▄█ ",
|
||||
-- }
|
||||
|
||||
-- vim.g.pcode_footer = "PCode"
|
||||
vim.g.pcode_footer = "PCode"
|
||||
|
||||
-- 1 startify model
|
||||
-- 2 dashboard model
|
||||
|
|
|
@ -15,7 +15,7 @@ return {
|
|||
dependencies = {
|
||||
{ "MunifTanjim/nui.nvim", enabled = use_noice },
|
||||
},
|
||||
event = "BufWinEnter",
|
||||
-- event = "BufWinEnter",
|
||||
opts = {
|
||||
messages = {
|
||||
enabled = false,
|
||||
|
@ -35,6 +35,9 @@ return {
|
|||
},
|
||||
},
|
||||
},
|
||||
init = function()
|
||||
require("lazy").load({ plugins = { "noice.nvim" } })
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<S-Enter>",
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
local icons = require("user.icons")
|
||||
return {
|
||||
--- masukan plugin tambahan disini
|
||||
-- {
|
||||
|
@ -18,36 +19,37 @@ return {
|
|||
-- },
|
||||
-- },
|
||||
-- },
|
||||
{
|
||||
"echasnovski/mini.indentscope",
|
||||
version = false, -- wait till new 0.7.0 release to put it back on semver
|
||||
event = "BufReadPre",
|
||||
opts = {
|
||||
-- symbol = "▏",
|
||||
symbol = "│",
|
||||
options = { try_as_border = true },
|
||||
},
|
||||
config = function(_, opts)
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "help", "alpha", "dashboard", "NvimTree", "Trouble", "lazy", "mason" },
|
||||
callback = function()
|
||||
vim.b.miniindentscope_disable = true
|
||||
end,
|
||||
})
|
||||
require("mini.indentscope").setup(opts)
|
||||
end,
|
||||
},
|
||||
-- {
|
||||
-- "echasnovski/mini.indentscope",
|
||||
-- version = false, -- wait till new 0.7.0 release to put it back on semver
|
||||
-- event = "BufReadPre",
|
||||
-- opts = {
|
||||
-- -- symbol = "▏",
|
||||
-- -- symbol = "│",
|
||||
-- symbol = icons.ui.LineMiddle,
|
||||
-- options = { try_as_border = true },
|
||||
-- },
|
||||
-- config = function(_, opts)
|
||||
-- vim.api.nvim_create_autocmd("FileType", {
|
||||
-- pattern = { "help", "alpha", "dashboard", "NvimTree", "Trouble", "lazy", "mason" },
|
||||
-- callback = function()
|
||||
-- vim.b.miniindentscope_disable = true
|
||||
-- end,
|
||||
-- })
|
||||
-- require("mini.indentscope").setup(opts)
|
||||
-- end,
|
||||
-- },
|
||||
{
|
||||
"hrsh7th/cmp-nvim-lua",
|
||||
enabled = false,
|
||||
},
|
||||
{
|
||||
"gbprod/yanky.nvim",
|
||||
event = "BufReadPre",
|
||||
config = function()
|
||||
require("user.yanky")
|
||||
end,
|
||||
},
|
||||
-- {
|
||||
-- "gbprod/yanky.nvim",
|
||||
-- event = "BufReadPre",
|
||||
-- config = function()
|
||||
-- require("user.yanky")
|
||||
-- end,
|
||||
-- },
|
||||
-- {
|
||||
-- "is0n/jaq-nvim",
|
||||
-- event = "BufRead",
|
||||
|
|
|
@ -121,7 +121,7 @@ return {
|
|||
separator = { left = " " },
|
||||
-- right_padding = 3,
|
||||
fmt = function(str)
|
||||
return " " .. str
|
||||
return icons.ui.Neovim .. " " .. str
|
||||
end,
|
||||
}
|
||||
local branch = {
|
||||
|
|
|
@ -1,40 +1,40 @@
|
|||
return {
|
||||
-- animations
|
||||
{
|
||||
"echasnovski/mini.animate",
|
||||
event = "InsertEnter",
|
||||
opts = function()
|
||||
-- don't use animate when scrolling with the mouse
|
||||
local mouse_scrolled = false
|
||||
for _, scroll in ipairs({ "Up", "Down" }) do
|
||||
local key = "<ScrollWheel" .. scroll .. ">"
|
||||
vim.keymap.set({ "", "i" }, key, function()
|
||||
mouse_scrolled = true
|
||||
return key
|
||||
end, { expr = true })
|
||||
end
|
||||
|
||||
local animate = require("mini.animate")
|
||||
return {
|
||||
resize = {
|
||||
timing = animate.gen_timing.linear({ duration = 100, unit = "total" }),
|
||||
},
|
||||
scroll = {
|
||||
timing = animate.gen_timing.linear({ duration = 150, unit = "total" }),
|
||||
subscroll = animate.gen_subscroll.equal({
|
||||
predicate = function(total_scroll)
|
||||
if mouse_scrolled then
|
||||
mouse_scrolled = false
|
||||
return false
|
||||
end
|
||||
return total_scroll > 1
|
||||
end,
|
||||
}),
|
||||
},
|
||||
}
|
||||
end,
|
||||
config = function(_, opts)
|
||||
require("mini.animate").setup(opts)
|
||||
end,
|
||||
},
|
||||
-- {
|
||||
-- "echasnovski/mini.animate",
|
||||
-- event = "InsertEnter",
|
||||
-- opts = function()
|
||||
-- -- don't use animate when scrolling with the mouse
|
||||
-- local mouse_scrolled = false
|
||||
-- for _, scroll in ipairs({ "Up", "Down" }) do
|
||||
-- local key = "<ScrollWheel" .. scroll .. ">"
|
||||
-- vim.keymap.set({ "", "i" }, key, function()
|
||||
-- mouse_scrolled = true
|
||||
-- return key
|
||||
-- end, { expr = true })
|
||||
-- end
|
||||
--
|
||||
-- local animate = require("mini.animate")
|
||||
-- return {
|
||||
-- resize = {
|
||||
-- timing = animate.gen_timing.linear({ duration = 100, unit = "total" }),
|
||||
-- },
|
||||
-- scroll = {
|
||||
-- timing = animate.gen_timing.linear({ duration = 150, unit = "total" }),
|
||||
-- subscroll = animate.gen_subscroll.equal({
|
||||
-- predicate = function(total_scroll)
|
||||
-- if mouse_scrolled then
|
||||
-- mouse_scrolled = false
|
||||
-- return false
|
||||
-- end
|
||||
-- return total_scroll > 1
|
||||
-- end,
|
||||
-- }),
|
||||
-- },
|
||||
-- }
|
||||
-- end,
|
||||
-- config = function(_, opts)
|
||||
-- require("mini.animate").setup(opts)
|
||||
-- end,
|
||||
-- },
|
||||
}
|
||||
|
|
|
@ -29,7 +29,8 @@ return {
|
|||
},
|
||||
},
|
||||
lazy = true,
|
||||
event = "BufReadPost",
|
||||
-- event = "BufReadPost",
|
||||
event = "BufWinEnter",
|
||||
config = function()
|
||||
vim.o.foldcolumn = "1" -- '0' is not bad
|
||||
vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
|
||||
|
|
|
@ -21,4 +21,6 @@ return {
|
|||
-- { "cpea2506/one_monokai.nvim" },
|
||||
-- { "luisiacc/gruvbox-baby", lazy = true, enabled = false },
|
||||
-- { "projekt0n/github-nvim-theme", version = "v0.0.7" },
|
||||
-- { "stevearc/dressing.nvim", enabled = false },
|
||||
{ "karb94/neoscroll.nvim", enabled = false },
|
||||
}
|
||||
|
|
|
@ -378,6 +378,7 @@ return {
|
|||
variables = "none",
|
||||
},
|
||||
highlights = {
|
||||
NoiceCursor = { fg = "$bg0", bg = "$fg" },
|
||||
Search = { fg = "$bg0", bg = "$bg_yellow" },
|
||||
-- BorderBG = { fg = "#333842" }, -- untuk custom brder color cmp
|
||||
-- overide indent line fill color
|
||||
|
|
|
@ -54,7 +54,7 @@ return {
|
|||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
lazy = true,
|
||||
event = "InsertEnter",
|
||||
-- event = "InsertEnter",
|
||||
-- dependencies = {
|
||||
-- "rafamadriz/friendly-snippets",
|
||||
-- event = "BufRead",
|
||||
|
@ -111,7 +111,7 @@ return {
|
|||
{
|
||||
"williamboman/mason.nvim",
|
||||
lazy = true,
|
||||
event = "InsertEnter",
|
||||
-- event = "InsertEnter",
|
||||
dependencies = { "williamboman/mason-lspconfig.nvim" },
|
||||
cmd = {
|
||||
"Mason",
|
||||
|
@ -241,7 +241,7 @@ return {
|
|||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
lazy = true,
|
||||
-- event = "BufWinEnter",
|
||||
event = "InsertEnter",
|
||||
-- event = "InsertEnter",
|
||||
dependencies = "nvim-treesitter/nvim-treesitter",
|
||||
config = function()
|
||||
require("ts_context_commentstring").setup({
|
||||
|
@ -252,7 +252,7 @@ return {
|
|||
{
|
||||
"numToStr/Comment.nvim",
|
||||
-- event = "BufWinEnter",
|
||||
event = "InsertEnter",
|
||||
-- event = "InsertEnter",
|
||||
lazy = true,
|
||||
config = function()
|
||||
require("user.comment")
|
||||
|
@ -327,7 +327,7 @@ return {
|
|||
{
|
||||
"CRAG666/code_runner.nvim",
|
||||
lazy = true,
|
||||
event = "InsertEnter",
|
||||
-- event = "InsertEnter",
|
||||
-- dependencies = "nvim-lua/plenary.nvim",
|
||||
cmd = { "RunCode", "RunFile", "RunProject", "RunClose" },
|
||||
config = function()
|
||||
|
@ -338,7 +338,7 @@ return {
|
|||
{
|
||||
"NvChad/nvim-colorizer.lua",
|
||||
lazy = true,
|
||||
event = "BufRead",
|
||||
event = "BufWinEnter",
|
||||
opts = function()
|
||||
require("user.colorizer")
|
||||
end,
|
||||
|
@ -390,7 +390,7 @@ return {
|
|||
{
|
||||
"mrjones2014/smart-splits.nvim",
|
||||
lazy = true,
|
||||
event = "BufRead",
|
||||
-- event = "BufRead",
|
||||
config = function()
|
||||
require("user.smartspit")
|
||||
end,
|
||||
|
@ -411,17 +411,20 @@ return {
|
|||
return vim.ui.input(...)
|
||||
end
|
||||
end,
|
||||
config = function()
|
||||
require("user.dressing")
|
||||
end,
|
||||
}, -- mini scrollview
|
||||
{
|
||||
"dstein64/nvim-scrollview",
|
||||
lazy = true,
|
||||
event = "BufRead",
|
||||
event = "BufWinEnter",
|
||||
config = function()
|
||||
require("user.nvimscroll")
|
||||
end,
|
||||
},
|
||||
-- for check startuptime
|
||||
{ "dstein64/vim-startuptime", lazy = true, cmd = "StartupTime", event = "InsertEnter" },
|
||||
{ "dstein64/vim-startuptime", lazy = true, cmd = "StartupTime" },
|
||||
-- for coloring pairs
|
||||
-- remark 20231101 - menyebabkan error treesitter
|
||||
-- {
|
||||
|
@ -441,7 +444,7 @@ return {
|
|||
lazy = true,
|
||||
enabled = vim.fn.executable("git") == 1,
|
||||
ft = "gitcommit",
|
||||
event = "BufRead",
|
||||
event = "BufWinEnter",
|
||||
config = function()
|
||||
require("user.gitsigns")
|
||||
end,
|
||||
|
|
|
@ -24,7 +24,7 @@ return {
|
|||
"kyazdani42/nvim-web-devicons",
|
||||
lazy = true,
|
||||
dependencies = { "DaikyXendo/nvim-material-icon" },
|
||||
event = "BufRead",
|
||||
-- event = "BufRead",
|
||||
config = function()
|
||||
require("user.webdevicons")
|
||||
end,
|
||||
|
@ -33,7 +33,7 @@ return {
|
|||
{
|
||||
"kyazdani42/nvim-tree.lua",
|
||||
lazy = true,
|
||||
event = "BufRead",
|
||||
-- event = "BufRead",
|
||||
cmd = { "NvimTree", "NvimTreeToggle", "NvimTreeFocus", "NvimTreeClose" },
|
||||
-- dependencies = "kyazdani42/nvim-web-devicons",
|
||||
config = function()
|
||||
|
@ -49,7 +49,7 @@ return {
|
|||
{
|
||||
"famiu/bufdelete.nvim",
|
||||
lazy = true,
|
||||
event = "InsertEnter",
|
||||
-- event = "InsertEnter",
|
||||
},
|
||||
{
|
||||
"akinsho/bufferline.nvim",
|
||||
|
@ -66,7 +66,7 @@ return {
|
|||
"akinsho/toggleterm.nvim",
|
||||
lazy = true,
|
||||
cmd = { "ToggleTerm" },
|
||||
event = "InsertEnter",
|
||||
-- event = "InsertEnter",
|
||||
config = function()
|
||||
require("user.toggleterm")
|
||||
end,
|
||||
|
@ -96,7 +96,7 @@ return {
|
|||
{
|
||||
"karb94/neoscroll.nvim",
|
||||
lazy = true,
|
||||
event = "InsertEnter",
|
||||
-- event = "InsertEnter",
|
||||
config = function()
|
||||
require("user.neoscroll")
|
||||
end,
|
||||
|
|
|
@ -35,20 +35,6 @@ dashboard.section.buttons.val = {
|
|||
dashboard.button("q", " Quit Neovim", ":qa<CR>"),
|
||||
}
|
||||
|
||||
local function footer()
|
||||
local footer_text = "Pojok Code"
|
||||
if data_exists then
|
||||
local data_txt = custom_dasboard.footer
|
||||
if data_txt ~= nil then
|
||||
footer_text = data_txt
|
||||
end
|
||||
end
|
||||
|
||||
return footer_text
|
||||
end
|
||||
|
||||
dashboard.section.footer.val = footer()
|
||||
|
||||
dashboard.section.footer.opts.hl = "Type"
|
||||
dashboard.section.header.opts.hl = "Include"
|
||||
dashboard.section.buttons.opts.hl = "Keyword"
|
||||
|
@ -56,3 +42,24 @@ dashboard.section.buttons.opts.hl = "Keyword"
|
|||
dashboard.opts.opts.noautocmd = true
|
||||
-- vim.cmd([[autocmd User AlphaReady echo 'ready']])
|
||||
alpha.setup(dashboard.opts)
|
||||
|
||||
local footer_text = "Pojok Code"
|
||||
if data_exists then
|
||||
local data_txt = custom_dasboard.footer
|
||||
if data_txt ~= nil then
|
||||
footer_text = data_txt
|
||||
end
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "LazyVimStarted",
|
||||
desc = "Add Alpha dashboard footer",
|
||||
once = true,
|
||||
callback = function()
|
||||
local stats = require("lazy").stats()
|
||||
local ms = math.floor(stats.startuptime * 100 + 0.5) / 100
|
||||
dashboard.section.footer.val =
|
||||
{ footer_text .. " " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" }
|
||||
pcall(vim.cmd.AlphaRedraw)
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -5,11 +5,13 @@ end
|
|||
|
||||
dressing.setup({
|
||||
input = {
|
||||
title_pos = "center",
|
||||
relative = "editor",
|
||||
default_prompt = "➤ ",
|
||||
win_options = { winhighlight = "Normal:Normal,NormalNC:Normal" },
|
||||
prefer_width = 30,
|
||||
max_width = { 140, 0.9 },
|
||||
min_width = { 30, 0.2 },
|
||||
min_width = { 50, 0.2 },
|
||||
},
|
||||
select = {
|
||||
backend = { "telescope", "builtin" },
|
||||
|
|
|
@ -131,6 +131,7 @@ return {
|
|||
TriangleShortArrowLeft = "",
|
||||
TriangleShortArrowRight = "",
|
||||
TriangleShortArrowUp = "",
|
||||
Neovim = "",
|
||||
},
|
||||
diagnostics = {
|
||||
BoldError = "",
|
||||
|
|
|
@ -2,69 +2,24 @@ local status_ok, indent_blankline = pcall(require, "ibl")
|
|||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
vim.g.indent_blankline_buftype_exclude = { "terminal", "nofile" }
|
||||
vim.g.indent_blankline_filetype_exclude = {
|
||||
local icons = require("user.icons")
|
||||
indent_blankline.setup({
|
||||
enabled = true,
|
||||
buftype_exclude = { "terminal", "nofile" },
|
||||
filetype_exclude = {
|
||||
"help",
|
||||
"startify",
|
||||
"dashboard",
|
||||
"packer",
|
||||
"lazy",
|
||||
"neogitstatus",
|
||||
"NvimTree",
|
||||
"Trouble",
|
||||
}
|
||||
vim.g.indentLine_enabled = 1
|
||||
-- vim.g.indent_blankline_char = "│"
|
||||
vim.g.indent_blankline_char = "▏"
|
||||
-- vim.g.indent_blankline_char = "▎"
|
||||
vim.g.indent_blankline_show_trailing_blankline_indent = false
|
||||
vim.g.indent_blankline_show_first_indent_level = true
|
||||
vim.g.indent_blankline_use_treesitter = true
|
||||
vim.g.indent_blankline_show_current_context = true
|
||||
vim.g.indent_blankline_context_patterns = {
|
||||
"class",
|
||||
"return",
|
||||
"function",
|
||||
"method",
|
||||
"^if",
|
||||
"^while",
|
||||
"jsx_element",
|
||||
"^for",
|
||||
"^object",
|
||||
"^table",
|
||||
"block",
|
||||
"arguments",
|
||||
"if_statement",
|
||||
"else_clause",
|
||||
"jsx_element",
|
||||
"jsx_self_closing_element",
|
||||
"try_statement",
|
||||
"catch_clause",
|
||||
"import_statement",
|
||||
"operation_type",
|
||||
}
|
||||
-- HACK: work-around for https://github.com/lukas-reineke/indent-blankline.nvim/issues/59
|
||||
vim.wo.colorcolumn = "99999"
|
||||
|
||||
-- vim.cmd [[highlight IndentBlanklineIndent1 guifg=#E06C75 gui=nocombine]]
|
||||
-- vim.cmd [[highlight IndentBlanklineIndent2 guifg=#E5C07B gui=nocombine]]
|
||||
-- vim.cmd [[highlight IndentBlanklineIndent3 guifg=#98C379 gui=nocombine]]
|
||||
-- vim.cmd [[highlight IndentBlanklineIndent4 guifg=#56B6C2 gui=nocombine]]
|
||||
-- vim.cmd [[highlight IndentBlanklineIndent5 guifg=#61AFEF gui=nocombine]]
|
||||
-- vim.cmd [[highlight IndentBlanklineIndent6 guifg=#C678DD gui=nocombine]]
|
||||
-- vim.opt.list = true
|
||||
-- vim.opt.listchars:append "space:⋅"
|
||||
-- vim.opt.listchars:append "space:"
|
||||
-- vim.opt.listchars:append "eol:↴"
|
||||
|
||||
indent_blankline.setup({
|
||||
-- show_end_of_line = true,
|
||||
-- space_char_blankline = " ",
|
||||
-- show_current_context = true,
|
||||
-- show_current_context_start = true,
|
||||
-- char_highlight_list = {
|
||||
-- "IndentBlanklineIndent1",
|
||||
-- "IndentBlanklineIndent2",
|
||||
-- "IndentBlanklineIndent3",
|
||||
-- },
|
||||
"text",
|
||||
},
|
||||
char = icons.ui.LineLeft,
|
||||
context_char = icons.ui.LineLeft,
|
||||
show_trailing_blankline_indent = false,
|
||||
show_first_indent_level = true,
|
||||
use_treesitter = true,
|
||||
show_current_context = true,
|
||||
})
|
||||
|
|
71
lua/user/indentline_backup.lua
Normal file
71
lua/user/indentline_backup.lua
Normal file
|
@ -0,0 +1,71 @@
|
|||
local status_ok, indent_blankline = pcall(require, "ibl")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
vim.g.indent_blankline_buftype_exclude = { "terminal", "nofile" }
|
||||
vim.g.indent_blankline_filetype_exclude = {
|
||||
"help",
|
||||
"startify",
|
||||
"dashboard",
|
||||
"packer",
|
||||
"neogitstatus",
|
||||
"NvimTree",
|
||||
"Trouble",
|
||||
}
|
||||
vim.g.indentLine_enabled = 1
|
||||
-- vim.g.indent_blankline_char = "│"
|
||||
-- vim.g.indent_blankline_char = "▏"
|
||||
vim.g.indent_blankline_char = " "
|
||||
-- vim.g.indent_blankline_char = "▎"
|
||||
vim.g.indent_blankline_show_trailing_blankline_indent = false
|
||||
vim.g.indent_blankline_show_first_indent_level = true
|
||||
vim.g.indent_blankline_use_treesitter = true
|
||||
vim.g.indent_blankline_show_current_context = true
|
||||
vim.g.indent_blankline_context_patterns = {
|
||||
"class",
|
||||
"return",
|
||||
"function",
|
||||
"method",
|
||||
"^if",
|
||||
"^while",
|
||||
"jsx_element",
|
||||
"^for",
|
||||
"^object",
|
||||
"^table",
|
||||
"block",
|
||||
"arguments",
|
||||
"if_statement",
|
||||
"else_clause",
|
||||
"jsx_element",
|
||||
"jsx_self_closing_element",
|
||||
"try_statement",
|
||||
"catch_clause",
|
||||
"import_statement",
|
||||
"operation_type",
|
||||
}
|
||||
-- HACK: work-around for https://github.com/lukas-reineke/indent-blankline.nvim/issues/59
|
||||
vim.wo.colorcolumn = "99999"
|
||||
|
||||
-- vim.cmd [[highlight IndentBlanklineIndent1 guifg=#E06C75 gui=nocombine]]
|
||||
-- vim.cmd [[highlight IndentBlanklineIndent2 guifg=#E5C07B gui=nocombine]]
|
||||
-- vim.cmd [[highlight IndentBlanklineIndent3 guifg=#98C379 gui=nocombine]]
|
||||
-- vim.cmd [[highlight IndentBlanklineIndent4 guifg=#56B6C2 gui=nocombine]]
|
||||
-- vim.cmd [[highlight IndentBlanklineIndent5 guifg=#61AFEF gui=nocombine]]
|
||||
-- vim.cmd [[highlight IndentBlanklineIndent6 guifg=#C678DD gui=nocombine]]
|
||||
-- vim.opt.list = true
|
||||
-- vim.opt.listchars:append "space:⋅"
|
||||
-- vim.opt.listchars:append "space:"
|
||||
-- vim.opt.listchars:append "eol:↴"
|
||||
|
||||
indent_blankline.setup({
|
||||
-- show_end_of_line = true,
|
||||
-- space_char_blankline = " ",
|
||||
-- show_current_context = true,
|
||||
-- show_current_context_start = true,
|
||||
-- char_highlight_list = {
|
||||
-- "IndentBlanklineIndent1",
|
||||
-- "IndentBlanklineIndent2",
|
||||
-- "IndentBlanklineIndent3",
|
||||
-- },
|
||||
})
|
|
@ -192,3 +192,8 @@ end
|
|||
-- keymap("t", "<C-j>", "<C-\\><C-N><C-w>j", term_opts)
|
||||
-- keymap("t", "<C-k>", "<C-\\><C-N><C-w>k", term_opts)
|
||||
-- keymap("t", "<C-l>", "<C-\\><C-N><C-w>l", term_opts)
|
||||
|
||||
vim.keymap.set("n", "<C-Left>", require("smart-splits").resize_left)
|
||||
vim.keymap.set("n", "<C-Down>", require("smart-splits").resize_down)
|
||||
vim.keymap.set("n", "<C-Up", require("smart-splits").resize_up)
|
||||
vim.keymap.set("n", "<C-Right>", require("smart-splits").resize_right)
|
||||
|
|
|
@ -12,7 +12,7 @@ smart_splits.setup({
|
|||
ignored_buftypes = { "nofile" },
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<C-Left>", require("smart-splits").resize_left)
|
||||
vim.keymap.set("n", "<C-Down>", require("smart-splits").resize_down)
|
||||
vim.keymap.set("n", "<C-Up", require("smart-splits").resize_up)
|
||||
vim.keymap.set("n", "<C-Right>", require("smart-splits").resize_right)
|
||||
-- vim.keymap.set("n", "<C-Left>", require("smart-splits").resize_left)
|
||||
-- vim.keymap.set("n", "<C-Down>", require("smart-splits").resize_down)
|
||||
-- vim.keymap.set("n", "<C-Up", require("smart-splits").resize_up)
|
||||
-- vim.keymap.set("n", "<C-Right>", require("smart-splits").resize_right)
|
||||
|
|
|
@ -47,9 +47,23 @@ if data_exists then
|
|||
footer_text = data_txt
|
||||
end
|
||||
end
|
||||
startify.section.footer.val = {
|
||||
{ type = "text", val = footer_text },
|
||||
}
|
||||
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "LazyVimStarted",
|
||||
desc = "Add Alpha dashboard footer",
|
||||
once = true,
|
||||
callback = function()
|
||||
local stats = require("lazy").stats()
|
||||
local ms = math.floor(stats.startuptime * 100 + 0.5) / 100
|
||||
startify.section.footer.val = {
|
||||
{
|
||||
type = "text",
|
||||
val = { footer_text .. " " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" },
|
||||
},
|
||||
}
|
||||
pcall(vim.cmd.AlphaRedraw)
|
||||
end,
|
||||
})
|
||||
-- ignore filetypes in MRU
|
||||
startify.mru_opts.ignore = function(path, ext)
|
||||
return (string.find(path, "COMMIT_EDITMSG")) or (vim.tbl_contains(default_mru_ignore, ext))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue