diff --git a/config/lvim/config.lua b/config/lvim/config.lua index 84be97b..3176613 100644 --- a/config/lvim/config.lua +++ b/config/lvim/config.lua @@ -5,14 +5,13 @@ lvim.colorscheme = "onedarker" -- Terminal lvim.builtin.terminal.active = true -lvim.builtin.autopairs.active = true -- GitSigns lvim.builtin.gitsigns.opts.current_line_blame = true lvim.builtin.gitsigns.opts.current_line_blame_opts = { delay = 200 } -- TreeSitter -lvim.builtin.treesitter.ensure_installed = { "javascript", "typescript", "jsdoc", "lua", "java" } +lvim.builtin.treesitter.ensure_installed = { "javascript", "typescript", "jsdoc", "lua" } lvim.builtin.treesitter.indent.disable = { "clojure", "java", "python" } -- Telescope @@ -27,18 +26,35 @@ lvim.keys.normal_mode[""] = "BufferClose" lvim.keys.normal_mode[""] = "w" lvim.builtin.which_key.mappings.l.d = { "TroubleToggle", "Diagnostics" } lvim.builtin.which_key.mappings.l.R = { "TroubleToggle lsp_references", "References" } +lvim.builtin.which_key.mappings["t"] = { + name = "Test", + t = { "Ultest", "Run test" }, + s = { "UltestStop", "Stop test" }, + c = { "UltestClear", "Clear test result" }, + n = { "UltestNearest", "Run test order by cursor" }, + o = { "UltestOutput", "Show output order by cursor" }, + j = { "(ultest-next-fail)", "Next fail" }, + k = { "(ultest-prev-fail)", "Prev fail" }, +} local fmt = string.format for i = 1, 9 do lvim.keys.normal_mode[fmt("", i)] = fmt("BufferGoto %d", i) end --- Plugins +-- Pluginos lvim.plugins = { { "tpope/vim-surround", keys = { "c", "y", "d" } }, - -- { "andymass/vim-matchup", keys = { "%" } }, + { "andymass/vim-matchup", keys = { "%" } }, { "tzachar/cmp-tabnine", run = "./install.sh", event = "InsertEnter" }, { "folke/trouble.nvim", cmd = { "TroubleToggle" } }, { "folke/todo-comments.nvim", event = "BufRead" }, { "theHamsta/nvim-dap-virtual-text", config = "require[[user.dap-virtual-text]].setup()" }, + { + "rcarriga/vim-ultest", + config = "require[[user.ultest]].setup()", + requires = { "vim-test/vim-test" }, + cmd = { "Ultest", "UltestStop", "UltestClear", "UltestNearest", "UltestOutput" }, + run = ":UpdateRemotePlugins", + }, } diff --git a/config/lvim/lua/user/ultest.lua b/config/lvim/lua/user/ultest.lua new file mode 100644 index 0000000..6956bdf --- /dev/null +++ b/config/lvim/lua/user/ultest.lua @@ -0,0 +1,8 @@ +local M = {} + +M.setup = function() + -- Go + vim.g["test#go#gotest#options"] = "-v" +end + +return M diff --git a/zshrc b/zshrc index 6cd8ba0..7293a2c 100644 --- a/zshrc +++ b/zshrc @@ -26,7 +26,7 @@ dotnet() { alias cls="clear" cp="cp -r" mkdir="mkdir -p" open="open_command" lg="lazygit" alias lv="lvim" vim="lvim" alias ...="cd ../.." .3="cd ../../.." -alias gor="go run" gob="go build" gog="go get" goi="go install" +alias gor="go run" gob="go build" gog="go get" goi="go install" got="go test" if [[ -f "/bin/exa" ]]; then alias ls="exa -l" ll="ls" la="ls -a"