Compare commits
7 Commits
1e345277ce
...
c4b6f4bf9e
| Author | SHA1 | Date |
|---|---|---|
|
|
c4b6f4bf9e | |
|
|
64e073f072 | |
|
|
6f8e7d8d04 | |
|
|
fb60227785 | |
|
|
b12665989e | |
|
|
df1dce2334 | |
|
|
8043b50da6 |
|
|
@ -2,15 +2,16 @@ local aerial = require("aerial")
|
||||||
|
|
||||||
aerial.setup({
|
aerial.setup({
|
||||||
layout = {
|
layout = {
|
||||||
width = 0.2,
|
width = 50,
|
||||||
default_direction = "prefer_right",
|
default_direction = "float",
|
||||||
},
|
},
|
||||||
|
|
||||||
show_guides = true,
|
show_guides = true,
|
||||||
|
|
||||||
open_automatic = true,
|
open_automatic = false,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.keymap.set("n", "{", "<cmd>AerialPrev<CR>")
|
vim.keymap.set("n", "{", "<cmd>AerialPrev<CR>")
|
||||||
vim.keymap.set("n", "}", "<cmd>AerialNext<CR>")
|
vim.keymap.set("n", "}", "<cmd>AerialNext<CR>")
|
||||||
vim.keymap.set("n", "<leader><leader>", aerial.focus)
|
vim.keymap.set("n", "<leader><leader>", aerial.toggle)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
require("autoclose").setup({
|
|
||||||
keys = {
|
|
||||||
["("] = { escape = false, close = true, pair = "()", disabled_filetypes = {} },
|
|
||||||
["["] = { escape = false, close = true, pair = "[]", disabled_filetypes = {} },
|
|
||||||
["{"] = { escape = false, close = true, pair = "{}", disabled_filetypes = {} },
|
|
||||||
|
|
||||||
[">"] = { escape = true, close = false, pair = "<>", disabled_filetypes = {} },
|
|
||||||
[")"] = { escape = true, close = false, pair = "()", disabled_filetypes = {} },
|
|
||||||
["]"] = { escape = true, close = false, pair = "[]", disabled_filetypes = {} },
|
|
||||||
["}"] = { escape = true, close = false, pair = "{}", disabled_filetypes = {} },
|
|
||||||
|
|
||||||
['"'] = { escape = true, close = true, pair = '""', disabled_filetypes = {"gitcommit", "tex", "asciidoc"} },
|
|
||||||
["'"] = { escape = true, close = true, pair = "''", disabled_filetypes = {"gitcommit", "tex", "asciidoc"} },
|
|
||||||
["`"] = { escape = true, close = true, pair = "``", disabled_filetypes = {"gitcommit", "tex", "asciidoc"} },
|
|
||||||
|
|
||||||
["$"] = { escape = true, close = true, pair = "$$", enabled_filetypes = {"tex"} },
|
|
||||||
},
|
|
||||||
options = {
|
|
||||||
disabled_filetypes = { "text" },
|
|
||||||
disable_when_touch = false,
|
|
||||||
pair_spaces = false,
|
|
||||||
auto_indent = true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
local autopairs = require('nvim-autopairs')
|
||||||
|
local Rule = require('nvim-autopairs.rule')
|
||||||
|
local cond = require('nvim-autopairs.conds')
|
||||||
|
|
||||||
|
autopairs.setup({
|
||||||
|
{
|
||||||
|
enabled = function(bufnr) return true end, -- control if auto-pairs should be enabled when attaching to a buffer
|
||||||
|
disable_filetype = { "TelescopePrompt", "spectre_panel", "snacks_picker_input" },
|
||||||
|
disable_in_macro = true, -- disable when recording or executing a macro
|
||||||
|
disable_in_visualblock = false, -- disable when insert after visual block mode
|
||||||
|
disable_in_replace_mode = true,
|
||||||
|
ignored_next_char = [=[[%w%%%'%[%"%.%`%$]]=],
|
||||||
|
enable_moveright = true,
|
||||||
|
enable_afterquote = true, -- add bracket pairs after quote
|
||||||
|
enable_check_bracket_line = false, --- 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
|
||||||
|
check_ts = false,
|
||||||
|
map_cr = true,
|
||||||
|
map_bs = true, -- map the <BS> key
|
||||||
|
map_c_h = false, -- Map the <C-h> key to delete a pair
|
||||||
|
map_c_w = true, -- map <c-w> to delete a pair if possible
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
autopairs.add_rules({
|
||||||
|
Rule("$", "$",{"tex", "latex"})
|
||||||
|
-- don't add a pair if the next character is %
|
||||||
|
:with_pair(cond.not_after_regex("%%"))
|
||||||
|
-- don't add a pair if the previous character is xxx
|
||||||
|
:with_pair(cond.not_before_regex("xxx", 3))
|
||||||
|
-- don't move right when repeat character
|
||||||
|
:with_move(cond.none())
|
||||||
|
-- don't delete if the next character is xx
|
||||||
|
:with_del(cond.not_after_regex("xx"))
|
||||||
|
-- disable adding a newline when you press <cr>
|
||||||
|
:with_cr(cond.none())
|
||||||
|
},
|
||||||
|
-- disable for .vim files, but it work for another filetypes
|
||||||
|
Rule("a","a","-vim")
|
||||||
|
)
|
||||||
|
|
||||||
|
autopairs.add_rules({
|
||||||
|
Rule("$$","$$","tex")
|
||||||
|
:with_pair(function(opts)
|
||||||
|
print(vim.inspect(opts))
|
||||||
|
if opts.line=="aa $$" then
|
||||||
|
-- don't add pair on that line
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
require('nvim-ts-autotag').setup({
|
||||||
|
opts = {
|
||||||
|
enable_close = true, -- Auto close tags
|
||||||
|
enable_rename = true, -- Auto rename pairs of tags
|
||||||
|
enable_close_on_slash = true -- Auto close on trailing </
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
vim.keymap.set('i', '<S-Tab>', 'copilot#Accept("\\<S-Tab>")', { expr = true, replace_keycodes = false })
|
||||||
|
|
||||||
|
vim.api.nvim_set_hl(0, 'CopilotChatHeader', { fg = '#7C3AED', bold = true })
|
||||||
|
vim.api.nvim_set_hl(0, 'CopilotChatSeparator', { fg = '#374151' })
|
||||||
|
|
||||||
|
require("CopilotChat").setup({
|
||||||
|
window = {
|
||||||
|
layout = 'float',
|
||||||
|
width = math.abs(math.floor(vim.o.columns * 0.8 + 0.5)),
|
||||||
|
height = math.abs(math.floor(vim.o.lines * 0.8 + 0.5)),
|
||||||
|
border = 'rounded',
|
||||||
|
title = '🤖 AI Assistant',
|
||||||
|
zindex = 100,
|
||||||
|
},
|
||||||
|
|
||||||
|
headers = {
|
||||||
|
user = '👤 You',
|
||||||
|
assistant = '🤖 Copilot',
|
||||||
|
tool = '🔧 Tool',
|
||||||
|
},
|
||||||
|
|
||||||
|
separator = '━━',
|
||||||
|
auto_fold = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
local chat = require("CopilotChat")
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>cc', chat.toggle, { desc = 'Toggle CopilotChat' })
|
||||||
|
|
||||||
|
vim.keymap.set('v', '<leader>cc', chat.open, { desc = 'Open CopilotChat with selection' })
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>cb', function()
|
||||||
|
chat.ask("Explain this code", { selection = require("CopilotChat.select").buffer })
|
||||||
|
end, { desc = 'Ask about current buffer' })
|
||||||
|
|
||||||
|
vim.keymap.set('v', '<leader>cf', function()
|
||||||
|
chat.ask("Fix this code")
|
||||||
|
end, { desc = 'Fix selected code' })
|
||||||
|
|
||||||
|
vim.keymap.set('v', '<leader>ce', function()
|
||||||
|
chat.ask("Explain this code")
|
||||||
|
end, { desc = 'Explain selected code' })
|
||||||
|
|
||||||
|
vim.keymap.set('v', '<leader>co', function()
|
||||||
|
chat.ask("Optimize this code")
|
||||||
|
end, { desc = 'Optimize selected code' })
|
||||||
|
|
||||||
|
|
@ -9,7 +9,13 @@ lsp.preset("recommended")
|
||||||
lsp.nvim_workspace()
|
lsp.nvim_workspace()
|
||||||
|
|
||||||
local luasnip = require("luasnip")
|
local luasnip = require("luasnip")
|
||||||
|
-- If you want insert `(` after select function or method item
|
||||||
|
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
||||||
local cmp = require('cmp')
|
local cmp = require('cmp')
|
||||||
|
cmp.event:on(
|
||||||
|
'confirm_done',
|
||||||
|
cmp_autopairs.on_confirm_done()
|
||||||
|
)
|
||||||
local cmp_select = { behavior = cmp.SelectBehavior.Select }
|
local cmp_select = { behavior = cmp.SelectBehavior.Select }
|
||||||
local cmp_mappings = lsp.defaults.cmp_mappings({
|
local cmp_mappings = lsp.defaults.cmp_mappings({
|
||||||
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
|
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
|
||||||
|
|
@ -47,7 +53,7 @@ lsp.set_preferences({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
lsp.on_attach(function(client, bufnr)
|
lsp.on_attach(function(_, bufnr)
|
||||||
local opts = { buffer = bufnr, remap = false }
|
local opts = { buffer = bufnr, remap = false }
|
||||||
|
|
||||||
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
|
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ require('lualine').setup {
|
||||||
-- lualine_a = { 'fileformat', 'mode' },
|
-- lualine_a = { 'fileformat', 'mode' },
|
||||||
lualine_a = { 'mode' },
|
lualine_a = { 'mode' },
|
||||||
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
||||||
lualine_c = { 'filename', 'aerial' },
|
lualine_c = { { 'filename', path = 1 }, 'aerial' },
|
||||||
lualine_x = { 'filesize', 'filetype' },
|
lualine_x = { 'filesize', 'filetype' },
|
||||||
lualine_y = { 'progress' },
|
lualine_y = { 'progress' },
|
||||||
lualine_z = { 'selectioncount', 'location' }
|
lualine_z = { 'selectioncount', 'location' }
|
||||||
|
|
@ -29,7 +29,7 @@ require('lualine').setup {
|
||||||
inactive_sections = {
|
inactive_sections = {
|
||||||
lualine_a = { 'fileformat' },
|
lualine_a = { 'fileformat' },
|
||||||
lualine_b = { 'diff', 'diagnostics' },
|
lualine_b = { 'diff', 'diagnostics' },
|
||||||
lualine_c = { 'filename' },
|
lualine_c = { { 'filename', path = 1 } },
|
||||||
lualine_x = { 'filesize', 'filetype'},
|
lualine_x = { 'filesize', 'filetype'},
|
||||||
lualine_y = {},
|
lualine_y = {},
|
||||||
lualine_z = { 'progress', 'location' }
|
lualine_z = { 'progress', 'location' }
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
require("mason-lspconfig").setup {
|
||||||
|
ensure_installed = {
|
||||||
|
"ansiblels",
|
||||||
|
"ast_grep",
|
||||||
|
"bashls",
|
||||||
|
"clangd",
|
||||||
|
"cmake",
|
||||||
|
"docker_compose_language_service",
|
||||||
|
"dockerls",
|
||||||
|
"jsonls",
|
||||||
|
"lua_ls",
|
||||||
|
"pyright",
|
||||||
|
"ts_ls"
|
||||||
|
},
|
||||||
|
automatic_installation = false,
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
require('satellite').setup {
|
||||||
|
current_only = false,
|
||||||
|
winblend = 50,
|
||||||
|
zindex = 40,
|
||||||
|
excluded_filetypes = {},
|
||||||
|
width = 10,
|
||||||
|
handlers = {
|
||||||
|
cursor = {
|
||||||
|
enable = true,
|
||||||
|
-- Supports any number of symbols
|
||||||
|
symbols = { '⎺', '⎻', '⎼', '⎽' }
|
||||||
|
-- symbols = { '⎻', '⎼' }
|
||||||
|
-- Highlights:
|
||||||
|
-- - SatelliteCursor (default links to NonText)
|
||||||
|
},
|
||||||
|
search = {
|
||||||
|
enable = true,
|
||||||
|
-- Highlights:
|
||||||
|
-- - SatelliteSearch (default links to Search)
|
||||||
|
-- - SatelliteSearchCurrent (default links to SearchCurrent)
|
||||||
|
},
|
||||||
|
diagnostic = {
|
||||||
|
enable = true,
|
||||||
|
signs = {'-', '=', '≡'},
|
||||||
|
min_severity = vim.diagnostic.severity.HINT,
|
||||||
|
-- Highlights:
|
||||||
|
-- - SatelliteDiagnosticError (default links to DiagnosticError)
|
||||||
|
-- - SatelliteDiagnosticWarn (default links to DiagnosticWarn)
|
||||||
|
-- - SatelliteDiagnosticInfo (default links to DiagnosticInfo)
|
||||||
|
-- - SatelliteDiagnosticHint (default links to DiagnosticHint)
|
||||||
|
},
|
||||||
|
gitsigns = {
|
||||||
|
enable = true,
|
||||||
|
signs = { -- can only be a single character (multibyte is okay)
|
||||||
|
add = "│",
|
||||||
|
change = "│",
|
||||||
|
delete = "-",
|
||||||
|
},
|
||||||
|
-- Highlights:
|
||||||
|
-- SatelliteGitSignsAdd (default links to GitSignsAdd)
|
||||||
|
-- SatelliteGitSignsChange (default links to GitSignsChange)
|
||||||
|
-- SatelliteGitSignsDelete (default links to GitSignsDelete)
|
||||||
|
},
|
||||||
|
marks = {
|
||||||
|
enable = true,
|
||||||
|
show_builtins = false, -- shows the builtin marks like [ ] < >
|
||||||
|
key = 'm'
|
||||||
|
-- Highlights:
|
||||||
|
-- SatelliteMark (default links to Normal)
|
||||||
|
},
|
||||||
|
quickfix = {
|
||||||
|
signs = { '-', '=', '≡' },
|
||||||
|
-- Highlights:
|
||||||
|
-- SatelliteQuickfix (default links to WarningMsg)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -5,7 +5,7 @@ require("tabset").setup({
|
||||||
},
|
},
|
||||||
languages = {
|
languages = {
|
||||||
{
|
{
|
||||||
filetypes = { "html", "json", "yaml", "xml", "markdown", "bash", "sh", "zsh" },
|
filetypes = { "dart", "cmake", "html", "json", "yaml", "xml", "markdown", "bash", "sh", "zsh" },
|
||||||
config = {
|
config = {
|
||||||
tabwidth = 2
|
tabwidth = 2
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,21 @@ local trouble = require("trouble.sources.telescope")
|
||||||
telescope.load_extension('aerial')
|
telescope.load_extension('aerial')
|
||||||
|
|
||||||
telescope.setup({
|
telescope.setup({
|
||||||
|
defaults = {
|
||||||
|
vimgrep_arguments = { "rg", "--color=never", "--no-heading", "--with-filename", "--line-number", "--column", "--smart-case", "--hidden", "--no-ignore" },
|
||||||
|
file_ignore_patterns = {
|
||||||
|
"node_modules", "vendor", "bower_components", "target", ".venv", "__pycache__",
|
||||||
|
"dist", "%.pyc", "%.pyo", "%.pyd",
|
||||||
|
"%.class", "%.jar",
|
||||||
|
"%.o", "%.obj", "%.dll", "%.exe", "%.so",
|
||||||
|
"%.dylib",
|
||||||
|
"%.zip", "%.tar",
|
||||||
|
"%.git", "%.cache",
|
||||||
|
"%.next", "%.nuxt",
|
||||||
|
"%.vscode", "%.idea",
|
||||||
|
"build", "install", "coverage",
|
||||||
|
}
|
||||||
|
},
|
||||||
extensions = {
|
extensions = {
|
||||||
aerial = {
|
aerial = {
|
||||||
-- How to format the symbols
|
-- How to format the symbols
|
||||||
|
|
@ -22,7 +37,7 @@ telescope.setup({
|
||||||
})
|
})
|
||||||
|
|
||||||
-- File pickers
|
-- File pickers
|
||||||
vim.keymap.set('n', '<leader>pf', "<cmd>Telescope find_files hidden=true<CR>", {})
|
vim.keymap.set('n', '<leader>pf', "<cmd>Telescope find_files hidden=true no_ignore=true<CR>", {})
|
||||||
vim.keymap.set('n', '<leader>pg', builtin.live_grep, {})
|
vim.keymap.set('n', '<leader>pg', builtin.live_grep, {})
|
||||||
vim.keymap.set('n', '<leader>ps', function()
|
vim.keymap.set('n', '<leader>ps', function()
|
||||||
builtin.grep_string({ search = vim.fn.input("Grep > ") });
|
builtin.grep_string({ search = vim.fn.input("Grep > ") });
|
||||||
|
|
@ -43,3 +58,4 @@ vim.keymap.set('n', '<leader>sh', builtin.help_tags, {})
|
||||||
vim.api.nvim_create_user_command('Help', function()
|
vim.api.nvim_create_user_command('Help', function()
|
||||||
builtin.help_tags()
|
builtin.help_tags()
|
||||||
end, {})
|
end, {})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
require 'nvim-treesitter.configs'.setup {
|
require 'nvim-treesitter.configs'.setup {
|
||||||
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
||||||
ensure_installed = { "bash", "lua", "vim", "regex", "c", "c_sharp",
|
ensure_installed = { "c", "cpp", "lua", "vim", "vimdoc", "query", "markdown", "markdown_inline" },
|
||||||
"python", "html", "css", "php", "javascript", "typescript", "sql"
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||||
sync_install = true,
|
sync_install = true,
|
||||||
|
|
@ -15,6 +12,21 @@ require 'nvim-treesitter.configs'.setup {
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
|
|
||||||
|
disable = function(lang, buf)
|
||||||
|
local max_filesize = 100 * 1024 -- 100 KB
|
||||||
|
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
|
||||||
|
local disabled_langs = { "latex" }
|
||||||
|
for _, l in ipairs(disabled_langs) do
|
||||||
|
if l == lang then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end,
|
||||||
|
|
||||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
-- Trim trailing whitespace on save
|
||||||
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
pattern = {"*"},
|
pattern = {"*"},
|
||||||
callback = function()
|
callback = function()
|
||||||
local save_cursor = vim.fn.getpos(".")
|
local save_cursor = vim.fn.getpos(".")
|
||||||
|
|
@ -7,6 +8,7 @@ vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Highlight search results
|
||||||
vim.api.nvim_create_autocmd({"CmdlineLeave", "CmdlineChanged"}, {
|
vim.api.nvim_create_autocmd({"CmdlineLeave", "CmdlineChanged"}, {
|
||||||
group = vim.api.nvim_create_augroup("SearchHighlight", { clear = true }),
|
group = vim.api.nvim_create_augroup("SearchHighlight", { clear = true }),
|
||||||
pattern = { "/", "\\?" },
|
pattern = { "/", "\\?" },
|
||||||
|
|
@ -15,6 +17,7 @@ vim.api.nvim_create_autocmd({"CmdlineLeave", "CmdlineChanged"}, {
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Highlight yanked text
|
||||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||||
desc = "Highlight yanked text",
|
desc = "Highlight yanked text",
|
||||||
group = vim.api.nvim_create_augroup("HighlightYank", { clear = true}),
|
group = vim.api.nvim_create_augroup("HighlightYank", { clear = true}),
|
||||||
|
|
@ -22,3 +25,9 @@ vim.api.nvim_create_autocmd("TextYankPost", {
|
||||||
vim.highlight.on_yank()
|
vim.highlight.on_yank()
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Set filetype for antlr4 files
|
||||||
|
vim.api.nvim_create_autocmd({"BufRead", "BufNewFile"}, {
|
||||||
|
pattern = {"*.g4"},
|
||||||
|
command = "set filetype=antlr4"
|
||||||
|
})
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,23 @@ LoadColors()
|
||||||
vim.cmd([[autocmd ColorScheme * lua OnColorschemeChanged()]])
|
vim.cmd([[autocmd ColorScheme * lua OnColorschemeChanged()]])
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("TransparentBackground", function(opts)
|
vim.api.nvim_create_user_command("TransparentBackground", function(opts)
|
||||||
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
if (opts.args == "on") then
|
||||||
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
||||||
end, {})
|
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
||||||
|
else
|
||||||
|
vim.api.nvim_set_hl(0, "Normal", {})
|
||||||
|
vim.api.nvim_set_hl(0, "NormalFloat", {})
|
||||||
|
end
|
||||||
|
end, {
|
||||||
|
nargs = 1,
|
||||||
|
complete = function()
|
||||||
|
return { "on", "off" }
|
||||||
|
end,
|
||||||
|
desc = "Toggle transparent background"
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_user_command('Theme', function(opts)
|
||||||
|
vim.cmd('colorscheme ' .. opts.args)
|
||||||
|
end, { nargs = 1, complete = 'color' })
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,10 @@ return require('packer').startup(function(use)
|
||||||
}
|
}
|
||||||
use "folke/trouble.nvim"
|
use "folke/trouble.nvim"
|
||||||
use "stevearc/aerial.nvim"
|
use "stevearc/aerial.nvim"
|
||||||
|
use "lewis6991/satellite.nvim"
|
||||||
use 'numToStr/Comment.nvim'
|
use 'numToStr/Comment.nvim'
|
||||||
use 'm4xshen/autoclose.nvim'
|
use 'windwp/nvim-autopairs'
|
||||||
|
use 'windwp/nvim-ts-autotag'
|
||||||
use({
|
use({
|
||||||
"kylechui/nvim-surround",
|
"kylechui/nvim-surround",
|
||||||
tag = "*", -- Use for stability; omit to use `main` branch for the latest features
|
tag = "*", -- Use for stability; omit to use `main` branch for the latest features
|
||||||
|
|
@ -86,4 +88,5 @@ return require('packer').startup(function(use)
|
||||||
|
|
||||||
-- Little friend
|
-- Little friend
|
||||||
use("github/copilot.vim")
|
use("github/copilot.vim")
|
||||||
|
use("CopilotC-Nvim/CopilotChat.nvim")
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
vim.keymap.set("n", "<leader>w", vim.cmd.w)
|
vim.keymap.set("n", "<leader>w", vim.cmd.w)
|
||||||
vim.keymap.set({ "n", "i" }, "<C-S>", vim.cmd.w)
|
vim.keymap.set({ "n", "i" }, "<C-S>", vim.cmd.w)
|
||||||
--vim.keymap.set("n", "<leader>e", vim.cmd.E)
|
--vim.keymap.set("n", "<leader>e", vim.cmd.E)
|
||||||
|
vim.keymap.set("i", "<C-BS>", "<C-w>")
|
||||||
|
|
||||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
||||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
||||||
|
|
@ -45,4 +46,3 @@ vim.keymap.set("n", "<leader>vpp", "<cmd>so ~/.config/nvim/lua/tiagorg/packer.lu
|
||||||
|
|
||||||
vim.keymap.set("n", "<C-q>", "<cmd>qa<CR>")
|
vim.keymap.set("n", "<C-q>", "<cmd>qa<CR>")
|
||||||
vim.keymap.set("n", "<A-t>", "<cmd>tabnew<CR><cmd>NvimTreeFocus<CR>")
|
vim.keymap.set("n", "<A-t>", "<cmd>tabnew<CR><cmd>NvimTreeFocus<CR>")
|
||||||
vim.keymap.set("n", "<S-Tab>", "<C-w>w")
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
vim.g.mouse = "a"
|
vim.g.mouse = "ar"
|
||||||
|
|
||||||
vim.opt.updatetime = 50
|
vim.opt.updatetime = 50
|
||||||
vim.opt.compatible = false
|
vim.opt.compatible = false
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
# Vim stuff
|
# Vim stuff
|
||||||
.vim/.netrwhist
|
.vim/.netrwhist
|
||||||
.vim/undodir/
|
.vim/undodir/
|
||||||
|
.vim/syntax/
|
||||||
.vim/pack/
|
.vim/pack/
|
||||||
.vim/plugged/
|
.vim/plugged/
|
||||||
.vim/autoload/plug.vim
|
.vim/autoload/plug.vim
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/bash
|
||||||
|
flameshot gui
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if pw-link -l | grep -q "alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Mic1__source:capture_FL" && \
|
||||||
|
pw-link -l | grep -A 1 "alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Mic1__source:capture_FL" | grep -q "alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Headphones__sink:playback_FL"; then
|
||||||
|
pw-link -d alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Mic1__source:capture_FL alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Headphones__sink:playback_FL
|
||||||
|
pw-link -d alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Mic1__source:capture_FR alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Headphones__sink:playback_FR
|
||||||
|
pw-link -d alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Mic1__source:capture_RL alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Headphones__sink:playback_FL
|
||||||
|
pw-link -d alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Mic1__source:capture_RR alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Headphones__sink:playback_FR
|
||||||
|
else
|
||||||
|
pw-link alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Mic1__source:capture_FL alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Headphones__sink:playback_FL
|
||||||
|
pw-link alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Mic1__source:capture_FR alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Headphones__sink:playback_FR
|
||||||
|
pw-link alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Mic1__source:capture_RL alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Headphones__sink:playback_FL
|
||||||
|
pw-link alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Mic1__source:capture_RR alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Headphones__sink:playback_FR
|
||||||
|
fi
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Get the current mute status using pactl
|
||||||
|
status=$(pactl get-sink-mute @DEFAULT_SINK@ | grep -q 'yes' && echo 'muted' || echo 'unmuted')
|
||||||
|
|
||||||
|
if [ "$status" = "unmuted" ]; then
|
||||||
|
# If the audio is unmuted, mute it
|
||||||
|
pactl set-sink-mute @DEFAULT_SINK@ 1
|
||||||
|
echo "Volume muted."
|
||||||
|
else
|
||||||
|
# If the audio is muted, unmute it
|
||||||
|
pactl set-sink-mute @DEFAULT_SINK@ 0
|
||||||
|
echo "Volume unmuted."
|
||||||
|
fi
|
||||||
1
.vimrc
1
.vimrc
|
|
@ -90,3 +90,4 @@ call plug#end()
|
||||||
|
|
||||||
syntax on
|
syntax on
|
||||||
colorscheme rosepine
|
colorscheme rosepine
|
||||||
|
au BufRead,BufNewFile *.g4 set filetype=antlr4
|
||||||
|
|
|
||||||
|
|
@ -339,3 +339,6 @@ export LD_LIBRARY_PATH=/home/tiagorg/.dotfiles/.local/lib:$LD_LIBRARY_PATH
|
||||||
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/gcr/ssh
|
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/gcr/ssh
|
||||||
|
|
||||||
eval "$(fzf --zsh)"
|
eval "$(fzf --zsh)"
|
||||||
|
|
||||||
|
export CLASSPATH=".:/usr/local/lib/antlr-4.13.2-complete.jar:/usr/local/lib/ST-4.3.4.jar"
|
||||||
|
export ANTLR4_PATH="/usr/local/lib"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue