diff --git a/.config/nvim/lua/tsousa/init.lua b/.config/nvim/lua/tsousa/init.lua index 2833f79..fbb54c7 100644 --- a/.config/nvim/lua/tsousa/init.lua +++ b/.config/nvim/lua/tsousa/init.lua @@ -1,5 +1,5 @@ -require("tsousa.set") require("tsousa.remap") +require("tsousa.set") require("tsousa.lazy") local augroup = vim.api.nvim_create_augroup diff --git a/.config/nvim/lua/tsousa/plugins/colorizer.lua b/.config/nvim/lua/tsousa/plugins/colorizer.lua new file mode 100644 index 0000000..8d2aec3 --- /dev/null +++ b/.config/nvim/lua/tsousa/plugins/colorizer.lua @@ -0,0 +1,11 @@ +return { + "norcalli/nvim-colorizer.lua", + config = function() + require("colorizer").setup({ + 'dosini'; + 'css'; + 'javascript'; + html = { mode = 'background' }; + }) + end, +} diff --git a/.config/nvim/lua/tsousa/plugins/comments.lua b/.config/nvim/lua/tsousa/plugins/comments.lua new file mode 100644 index 0000000..2be16f4 --- /dev/null +++ b/.config/nvim/lua/tsousa/plugins/comments.lua @@ -0,0 +1,48 @@ +return { + "numToStr/Comment.nvim", + config = function() + require('Comment').setup({ + ---Add a space b/w comment and the line + padding = true, + ---Whether the cursor should stay at its position + sticky = true, + ---Lines to be ignored while (un)comment + ignore = nil, + ---LHS of toggle mappings in NORMAL mode + toggler = { + ---Line-comment toggle keymap + line = 'gcc', + ---Block-comment toggle keymap + block = 'gbc', + }, + ---LHS of operator-pending mappings in NORMAL and VISUAL mode + opleader = { + ---Line-comment keymap + line = 'gc', + ---Block-comment keymap + block = 'gb', + }, + ---LHS of extra mappings + extra = { + ---Add comment on the line above + above = 'gcO', + ---Add comment on the line below + below = 'gco', + ---Add comment at the end of line + eol = 'gcA', + }, + ---Enable keybindings + ---NOTE: If given `false` then the plugin won't create any mappings + mappings = { + ---Operator-pending mapping; `gcc` `gbc` `gc[count]{motion}` `gb[count]{motion}` + basic = true, + ---Extra mapping; `gco`, `gcO`, `gcA` + extra = true, + }, + ---Function to call before (un)comment + pre_hook = nil, + ---Function to call after (un)comment + post_hook = nil, + }) + end +} diff --git a/.config/nvim/lua/tsousa/plugins/telescope.lua b/.config/nvim/lua/tsousa/plugins/telescope.lua index 961effd..4c0bbe6 100644 --- a/.config/nvim/lua/tsousa/plugins/telescope.lua +++ b/.config/nvim/lua/tsousa/plugins/telescope.lua @@ -4,11 +4,16 @@ return { "nvim-lua/plenary.nvim" }, config = function() + -- require('telescope').setup({ + -- pickers = { + -- theme = "ivy" + -- }, + -- }) + local builtin = require('telescope.builtin') vim.keymap.set('n', 'pf', builtin.find_files, {}) vim.keymap.set('n', 'pg', builtin.live_grep, {}) vim.keymap.set('n', 'gf', builtin.git_files, {}) - -- vim.keymap.set('n', 'sb', builtin.buffers, {}) vim.keymap.set('n', 'vh', builtin.help_tags, {}) end } diff --git a/.config/nvim/lua/tsousa/set.lua b/.config/nvim/lua/tsousa/set.lua index c167b8c..9a0d575 100644 --- a/.config/nvim/lua/tsousa/set.lua +++ b/.config/nvim/lua/tsousa/set.lua @@ -29,6 +29,18 @@ vim.opt.scrolloff = 8 vim.opt.signcolumn = "yes" vim.opt.isfname:append("@-@") +-- from tj devries +vim.opt.formatoptions = vim.opt.formatoptions + - "a" -- Auto formatting is BAD. + - "t" -- Don't auto format my code. I got linters for that. + + "c" -- In general, I like it when comments respect textwidth + + "q" -- Allow formatting comments w/ gq + - "o" -- O and o, don't continue comments + + "r" -- But do continue when pressing enter. + + "n" -- Indent past the formatlistpat, not underneath it. + + "j" -- Auto-remove comments if possible. + - "2" -- I'm not in gradeschool anymore + -- Give more space for displaying messages. vim.opt.cmdheight = 1