diff --git a/lua/custom/plugins/csv-view.lua b/lua/custom/plugins/csv-view.lua new file mode 100644 index 0000000..3e27d40 --- /dev/null +++ b/lua/custom/plugins/csv-view.lua @@ -0,0 +1,22 @@ +return { + 'hat0uma/csvview.nvim', + ---@module "csvview" + ---@type CsvView.Options + opts = { + parser = { comments = { '#', '//' } }, + keymaps = { + -- Text objects for selecting fields + textobject_field_inner = { 'if', mode = { 'o', 'x' } }, + textobject_field_outer = { 'af', mode = { 'o', 'x' } }, + -- Excel-like navigation: + -- Use and to move horizontally between fields. + -- Use and to move vertically between rows and place the cursor at the end of the field. + -- Note: In terminals, you may need to enable CSI-u mode to use and . + jump_next_field_end = { '', mode = { 'n', 'v' } }, + jump_prev_field_end = { '', mode = { 'n', 'v' } }, + jump_next_row = { '', mode = { 'n', 'v' } }, + jump_prev_row = { '', mode = { 'n', 'v' } }, + }, + }, + cmd = { 'CsvViewEnable', 'CsvViewDisable', 'CsvViewToggle' }, +} diff --git a/lua/custom/plugins/mini.lua b/lua/custom/plugins/mini.lua index 5e7f743..8c4562b 100644 --- a/lua/custom/plugins/mini.lua +++ b/lua/custom/plugins/mini.lua @@ -14,7 +14,13 @@ return { -- Collection of various small independent plugins/modules -- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren -- - sd' - [S]urround [D]elete [']quotes -- - sr)' - [S]urround [R]eplace [)] ['] - require('mini.surround').setup() + require('mini.surround').setup { + mappings = { + add = 'ma', + delete = 'md', + replace = 'mr', + }, + } -- Simple and easy statusline. -- You could remove this setup call if you don't like it, diff --git a/lua/custom/plugins/rainbow-csv.lua b/lua/custom/plugins/rainbow-csv.lua new file mode 100644 index 0000000..b4cf791 --- /dev/null +++ b/lua/custom/plugins/rainbow-csv.lua @@ -0,0 +1,19 @@ +return { + 'cameron-wags/rainbow_csv.nvim', + config = true, + ft = { + 'csv', + 'tsv', + 'csv_semicolon', + 'csv_whitespace', + 'csv_pipe', + 'rfc_csv', + 'rfc_semicolon', + }, + cmd = { + 'RainbowDelim', + 'RainbowDelimSimple', + 'RainbowDelimQuoted', + 'RainbowMultiDelim', + }, +} diff --git a/lua/custom/plugins/which-key.lua b/lua/custom/plugins/which-key.lua index cb75a86..bf9c329 100644 --- a/lua/custom/plugins/which-key.lua +++ b/lua/custom/plugins/which-key.lua @@ -14,7 +14,9 @@ return { -- Useful plugin to show you pending keybinds. { 't', desc = '[T]oggle' }, { 'h', desc = 'Git [H]unk' }, { 'g', desc = '[G]it Search' }, + { 'm', desc = '[M]ini' }, } + -- visual mode wk.add({ { 'h', 'Git [H]unk' },