diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 0a652a7..0513489 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -55,7 +55,7 @@ M.general = { }, t = { - [""] = { vim.api.nvim_replace_termcodes("", true, true, true), "Escape terminal mode" }, + [""] = { vim.api.nvim_replace_termcodes("", true, true, true), "Escape terminal mode" }, }, v = { diff --git a/lua/custom/configs/nvterm.lua b/lua/custom/configs/nvterm.lua new file mode 100644 index 0000000..aa50f76 --- /dev/null +++ b/lua/custom/configs/nvterm.lua @@ -0,0 +1,28 @@ +local options = { + terminals = { + -- shell = vim.o.shell, + -- list = {}, + type_opts = { + float = { + -- relative = "editor", + row = 0, + col = 0, + width = 0.9, + height = 0.9, + -- border = "single", + }, + -- horizontal = { location = "rightbelow", split_ratio = 0.3 }, + -- vertical = { location = "rightbelow", split_ratio = 0.5 }, + }, + }, + -- behavior = { + -- autoclose_on_quit = { + -- enabled = false, + -- confirm = true, + -- }, + -- close_on_exit = true, + -- auto_insert = true, + -- }, +} + +return options diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index 3f58b3f..c339051 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -18,6 +18,7 @@ M.general = { ["ws"] = { "s", "Split horizontal" }, ["wo"] = { "o", "Maximize split" }, ["wc"] = { "c", "Close split" }, + ["wx"] = { "c", "Close split" }, ["w="] = { "=", "Even splits" }, ["h"] = { "h", "Focus left split" }, ["j"] = { "j", "Focus lower split" }, @@ -35,6 +36,7 @@ M.general = { ["n"] = { " NvimTreeToggle ", "Toggle nvimtree" }, ["N"] = { " set nu! ", "Toggle line number" }, + ["x"] = { "bdelete", "Close Buffer and window" }, ["c"] = { "Bdelete", "Close Buffer" }, ["b"] = { " Telescope buffers ", "Find buffers" }, @@ -43,7 +45,7 @@ M.general = { ["gu"] = { "diffget //2", "Select left in conflict" }, ["gh"] = { "diffget //3", "Select right in conflict" }, - ["gl"] = { + ["ge"] = { function() vim.diagnostic.open_float { border = "rounded" } end, diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 3623ada..74b80a9 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -23,6 +23,13 @@ local plugins = { }, -- override plugin configs + { + "NvChad/nvterm", + opts = function() + return require "custom.configs.nvterm" + end, + }, + { "williamboman/mason.nvim", opts = vim.tbl_deep_extend("force", overrides.mason, { @@ -143,11 +150,66 @@ local plugins = { enabled = false, }, + { "rouge8/neotest-rust" }, + { "jfpedroza/neotest-elixir" }, + { - "lewis6991/gitsigns.nvim", - enabled = false, + "nvim-neotest/neotest", + lazy = false, + dependencies = { + "nvim-lua/plenary.nvim", + "antoinemadec/FixCursorHold.nvim", + "nvim-treesitter/nvim-treesitter", + }, + config = function() + require("neotest").setup { + adapters = { + require "neotest-rust", + require "neotest-elixir" { + -- -- The Mix task to use to run the tests + -- -- Can be a function to return a dynamic value. + -- -- Default: "test" + -- mix_task = { "my_custom_task" }, + -- -- Other formatters to pass to the test command as the formatters are overridden + -- -- Can be a function to return a dynamic value. + -- -- Default: {"ExUnit.CLIFormatter"} + -- extra_formatters = { "ExUnit.CLIFormatter", "ExUnitNotifier" }, + -- -- Extra test block identifiers + -- -- Can be a function to return a dynamic value. + -- -- Block identifiers "test", "feature" and "property" are always supported by default. + -- -- Default: {} + -- extra_block_identifiers = { "test_with_mock" }, + -- -- Extra arguments to pass to mix test + -- -- Can be a function that receives the position, to return a dynamic value + -- -- Default: {} + -- args = { "--trace" }, + -- -- Command wrapper + -- -- Must be a function that receives the mix command as a table, to return a dynamic value + -- -- Default: function(cmd) return cmd end + -- post_process_command = function(cmd) + -- return vim.tbl_flatten { { "env", "FOO=bar" }, cmd } + -- end, + -- -- Delays writes so that results are updated at most every given milliseconds + -- -- Decreasing this number improves snappiness at the cost of performance + -- -- Can be a function to return a dynamic value. + -- -- Default: 1000 + -- write_delay = 1000, + }, + }, + } + end, }, + -- { + -- "rouge8/neotest-rust", + -- config = function() end, + -- }, + -- + -- { + -- "jfpedroza/neotest-elixir", + -- config = function() end, + -- }, + -- To make a plugin not be loaded -- { -- "NvChad/nvim-colorizer.lua",