added ansible script
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
vim.cmd.colorscheme("rose-pine")
|
||||
-- sonokai
|
||||
-- rose-pine
|
||||
-- onedark
|
||||
-- nightfox
|
||||
-- kanagawa
|
||||
-- gruvbox-mat
|
||||
-- everforest
|
||||
-- dracula
|
||||
-- carbonfox
|
||||
-- tokyonight
|
||||
-- vim.cmd.colorscheme("rose-pine")
|
||||
-- vim.cmd.colorscheme("sonokai")
|
||||
-- vim.cmd.colorscheme("one-dark")
|
||||
-- vim.cmd.colorscheme("nightfox")
|
||||
-- vim.cmd.colorscheme("kanagawa")
|
||||
vim.cmd.colorscheme("gruvbox-material")
|
||||
-- vim.cmd.colorscheme("everforest")
|
||||
-- vim.cmd.colorscheme("dracula")
|
||||
-- vim.cmd.colorscheme("carbonfox")
|
||||
-- vim.cmd.colorscheme("tokyonight")
|
||||
|
||||
@@ -13,26 +13,26 @@ return {
|
||||
local cmp = require("cmp")
|
||||
|
||||
autopairs.setup({
|
||||
check_ts = true, -- Enable treesitter
|
||||
check_ts = true, -- Enable treesitter
|
||||
ts_config = {
|
||||
lua = { "string" }, -- Don't add pairs in lua string treesitter nodes
|
||||
lua = { "string" }, -- Don't add pairs in lua string treesitter nodes
|
||||
javascript = { "template_string" }, -- Don't add pairs in JS template strings
|
||||
java = false, -- Don't check treesitter on java
|
||||
java = false, -- Don't check treesitter on java
|
||||
},
|
||||
disable_filetype = { "TelescopePrompt", "vim" },
|
||||
disable_in_macro = true, -- Disable when recording or executing a macro
|
||||
disable_in_macro = true, -- Disable when recording or executing a macro
|
||||
disable_in_visualblock = false, -- Disable when in visual block mode
|
||||
disable_in_replace_mode = true,
|
||||
ignored_next_char = [=[[%w%%%'%[%"%.%`%$]]=],
|
||||
enable_moveright = true,
|
||||
enable_afterquote = true, -- Add bracket pairs after quote
|
||||
enable_afterquote = true, -- Add bracket pairs after quote
|
||||
enable_check_bracket_line = true, -- Check bracket in same line
|
||||
enable_bracket_in_quote = true,
|
||||
enable_abbr = false, -- Trigger abbreviation
|
||||
break_undo = true, -- Switch for basic rule break undo sequence
|
||||
enable_abbr = false, -- Trigger abbreviation
|
||||
break_undo = true, -- Switch for basic rule break undo sequence
|
||||
check_comma = true,
|
||||
map_cr = true,
|
||||
map_bs = true, -- Map the <BS> key
|
||||
map_bs = true, -- Map the <BS> key
|
||||
map_c_h = false, -- Map the <C-h> key to delete a pair
|
||||
map_c_w = false, -- Map <c-w> to delete a pair if possible
|
||||
})
|
||||
@@ -55,41 +55,41 @@ return {
|
||||
|
||||
autopairs.add_rules({
|
||||
Rule(" ", " ")
|
||||
:with_pair(function(opts)
|
||||
local pair = opts.line:sub(opts.col - 1, opts.col)
|
||||
return vim.tbl_contains({ "()", "[]", "{}" }, pair)
|
||||
end)
|
||||
:with_move(cond.none())
|
||||
:with_cr(cond.none())
|
||||
:with_del(function(opts)
|
||||
local col = vim.api.nvim_win_get_cursor(0)[2]
|
||||
local context = opts.line:sub(col - 1, col + 2)
|
||||
return vim.tbl_contains({ "( )", "[ ]", "{ }" }, context)
|
||||
end),
|
||||
:with_pair(function(opts)
|
||||
local pair = opts.line:sub(opts.col - 1, opts.col)
|
||||
return vim.tbl_contains({ "()", "[]", "{}" }, pair)
|
||||
end)
|
||||
:with_move(cond.none())
|
||||
:with_cr(cond.none())
|
||||
:with_del(function(opts)
|
||||
local col = vim.api.nvim_win_get_cursor(0)[2]
|
||||
local context = opts.line:sub(col - 1, col + 2)
|
||||
return vim.tbl_contains({ "( )", "[ ]", "{ }" }, context)
|
||||
end),
|
||||
Rule("", " )")
|
||||
:with_pair(cond.none())
|
||||
:with_move(function(opts)
|
||||
return opts.char == ")"
|
||||
end)
|
||||
:with_cr(cond.none())
|
||||
:with_del(cond.none())
|
||||
:use_key(")"),
|
||||
:with_pair(cond.none())
|
||||
:with_move(function(opts)
|
||||
return opts.char == ")"
|
||||
end)
|
||||
:with_cr(cond.none())
|
||||
:with_del(cond.none())
|
||||
:use_key(")"),
|
||||
Rule("", " }")
|
||||
:with_pair(cond.none())
|
||||
:with_move(function(opts)
|
||||
return opts.char == "}"
|
||||
end)
|
||||
:with_cr(cond.none())
|
||||
:with_del(cond.none())
|
||||
:use_key("}"),
|
||||
:with_pair(cond.none())
|
||||
:with_move(function(opts)
|
||||
return opts.char == "}"
|
||||
end)
|
||||
:with_cr(cond.none())
|
||||
:with_del(cond.none())
|
||||
:use_key("}"),
|
||||
Rule("", " ]")
|
||||
:with_pair(cond.none())
|
||||
:with_move(function(opts)
|
||||
return opts.char == "]"
|
||||
end)
|
||||
:with_cr(cond.none())
|
||||
:with_del(cond.none())
|
||||
:use_key("]"),
|
||||
:with_pair(cond.none())
|
||||
:with_move(function(opts)
|
||||
return opts.char == "]"
|
||||
end)
|
||||
:with_cr(cond.none())
|
||||
:with_del(cond.none())
|
||||
:use_key("]"),
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
@@ -6,13 +6,25 @@ return {
|
||||
main = "ibl",
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
config = function()
|
||||
-- Define highlights BEFORE setup() is called
|
||||
local function set_highlights()
|
||||
vim.api.nvim_set_hl(0, "IblIndent", { fg = "#313244" })
|
||||
vim.api.nvim_set_hl(0, "IblScope", { fg = "#5E81AC" })
|
||||
end
|
||||
|
||||
set_highlights()
|
||||
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||
pattern = "*",
|
||||
callback = set_highlights,
|
||||
})
|
||||
|
||||
require("ibl").setup({
|
||||
indent = {
|
||||
char = "▏",
|
||||
},
|
||||
scope = {
|
||||
enabled = true,
|
||||
char = "▏", -- Same character, different color
|
||||
char = "▏",
|
||||
show_start = true,
|
||||
show_end = true,
|
||||
},
|
||||
@@ -26,18 +38,6 @@ return {
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Very subtle gray for all indent lines
|
||||
vim.api.nvim_set_hl(0, "IblIndent", { fg = "#313244" })
|
||||
|
||||
-- Soft accent for current scope (choose one):
|
||||
-- Blue:
|
||||
vim.api.nvim_set_hl(0, "IblScope", { fg = "#5E81AC" })
|
||||
|
||||
-- Or Purple:
|
||||
-- vim.api.nvim_set_hl(0, "IblScope", { fg = "#B48EAD" })
|
||||
-- Or Green:
|
||||
-- vim.api.nvim_set_hl(0, "IblScope", { fg = "#A3BE8C" })
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user