diff --git a/.config/nvim/after/plugin/autoclose.lua b/.config/nvim/after/plugin/autoclose.lua index 9e66d01..a6f1af1 100644 --- a/.config/nvim/after/plugin/autoclose.lua +++ b/.config/nvim/after/plugin/autoclose.lua @@ -9,9 +9,9 @@ require("autoclose").setup({ ["]"] = { 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 = '""', disabled_filetypes = {"markdown", "gitcommit", "tex", "asciidoc"} }, + ["'"] = { escape = true, close = true, pair = "''", disabled_filetypes = {"markdown", "gitcommit", "tex", "asciidoc"} }, + ["`"] = { escape = true, close = true, pair = "``", disabled_filetypes = {"markdown", "gitcommit", "tex", "asciidoc"} }, ["$"] = { escape = true, close = true, pair = "$$", enabled_filetypes = {"tex"} }, }, diff --git a/.config/nvim/after/plugin/tabset.lua b/.config/nvim/after/plugin/tabset.lua index f63d884..2f86b48 100644 --- a/.config/nvim/after/plugin/tabset.lua +++ b/.config/nvim/after/plugin/tabset.lua @@ -5,7 +5,7 @@ require("tabset").setup({ }, languages = { { - filetypes = { "html", "json", "yaml", "xml", "markdown", "bash", "sh", "zsh" }, + filetypes = { "cmake", "html", "json", "yaml", "xml", "markdown", "bash", "sh", "zsh" }, config = { tabwidth = 2 } diff --git a/.config/nvim/lua/tiagorg/autocmd.lua b/.config/nvim/lua/tiagorg/autocmd.lua index 7fd8007..70f8b5e 100644 --- a/.config/nvim/lua/tiagorg/autocmd.lua +++ b/.config/nvim/lua/tiagorg/autocmd.lua @@ -1,4 +1,5 @@ -vim.api.nvim_create_autocmd({ "BufWritePre" }, { +-- Trim trailing whitespace on save +vim.api.nvim_create_autocmd("BufWritePre", { pattern = {"*"}, callback = function() local save_cursor = vim.fn.getpos(".") @@ -7,6 +8,7 @@ vim.api.nvim_create_autocmd({ "BufWritePre" }, { end, }) +-- Highlight search results vim.api.nvim_create_autocmd({"CmdlineLeave", "CmdlineChanged"}, { group = vim.api.nvim_create_augroup("SearchHighlight", { clear = true }), pattern = { "/", "\\?" }, @@ -15,6 +17,7 @@ vim.api.nvim_create_autocmd({"CmdlineLeave", "CmdlineChanged"}, { end }) +-- Highlight yanked text vim.api.nvim_create_autocmd("TextYankPost", { desc = "Highlight yanked text", group = vim.api.nvim_create_augroup("HighlightYank", { clear = true}), @@ -22,3 +25,9 @@ vim.api.nvim_create_autocmd("TextYankPost", { vim.highlight.on_yank() end }) + +-- Set filetype for antlr4 files +vim.api.nvim_create_autocmd({"BufRead", "BufNewFile"}, { + pattern = {"*.g4"}, + command = "set filetype=antlr4" +}) diff --git a/.config/nvim/lua/tiagorg/packer.lua b/.config/nvim/lua/tiagorg/packer.lua index a6a1fc8..7e047ae 100644 --- a/.config/nvim/lua/tiagorg/packer.lua +++ b/.config/nvim/lua/tiagorg/packer.lua @@ -86,4 +86,7 @@ return require('packer').startup(function(use) -- Little friend use("github/copilot.vim") + + -- Temp + use("dylon/vim-antlr") end) diff --git a/.gitignore b/.gitignore index e269bd2..4a15540 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Vim stuff .vim/.netrwhist .vim/undodir/ +.vim/syntax/ .vim/pack/ .vim/plugged/ .vim/autoload/plug.vim diff --git a/.vimrc b/.vimrc index ee38cc0..15bd465 100644 --- a/.vimrc +++ b/.vimrc @@ -90,3 +90,4 @@ call plug#end() syntax on colorscheme rosepine +au BufRead,BufNewFile *.g4 set filetype=antlr4 diff --git a/.zsh/.zshrc b/.zsh/.zshrc index d056064..6643ae1 100644 --- a/.zsh/.zshrc +++ b/.zsh/.zshrc @@ -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 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"