added comments plugin, need to fix the damn copilot
This commit is contained in:
parent
89d607adfd
commit
607f7448e1
5 changed files with 78 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
require("tsousa.set")
|
|
||||||
require("tsousa.remap")
|
require("tsousa.remap")
|
||||||
|
require("tsousa.set")
|
||||||
require("tsousa.lazy")
|
require("tsousa.lazy")
|
||||||
|
|
||||||
local augroup = vim.api.nvim_create_augroup
|
local augroup = vim.api.nvim_create_augroup
|
||||||
|
|
11
.config/nvim/lua/tsousa/plugins/colorizer.lua
Normal file
11
.config/nvim/lua/tsousa/plugins/colorizer.lua
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
return {
|
||||||
|
"norcalli/nvim-colorizer.lua",
|
||||||
|
config = function()
|
||||||
|
require("colorizer").setup({
|
||||||
|
'dosini';
|
||||||
|
'css';
|
||||||
|
'javascript';
|
||||||
|
html = { mode = 'background' };
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
48
.config/nvim/lua/tsousa/plugins/comments.lua
Normal file
48
.config/nvim/lua/tsousa/plugins/comments.lua
Normal file
|
@ -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
|
||||||
|
}
|
|
@ -4,11 +4,16 @@ return {
|
||||||
"nvim-lua/plenary.nvim"
|
"nvim-lua/plenary.nvim"
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
|
-- require('telescope').setup({
|
||||||
|
-- pickers = {
|
||||||
|
-- theme = "ivy"
|
||||||
|
-- },
|
||||||
|
-- })
|
||||||
|
|
||||||
local builtin = require('telescope.builtin')
|
local builtin = require('telescope.builtin')
|
||||||
vim.keymap.set('n', '<leader>pf', builtin.find_files, {})
|
vim.keymap.set('n', '<leader>pf', builtin.find_files, {})
|
||||||
vim.keymap.set('n', '<leader>pg', builtin.live_grep, {})
|
vim.keymap.set('n', '<leader>pg', builtin.live_grep, {})
|
||||||
vim.keymap.set('n', '<leader>gf', builtin.git_files, {})
|
vim.keymap.set('n', '<leader>gf', builtin.git_files, {})
|
||||||
-- vim.keymap.set('n', '<leader>sb', builtin.buffers, {})
|
|
||||||
vim.keymap.set('n', '<leader>vh', builtin.help_tags, {})
|
vim.keymap.set('n', '<leader>vh', builtin.help_tags, {})
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,18 @@ vim.opt.scrolloff = 8
|
||||||
vim.opt.signcolumn = "yes"
|
vim.opt.signcolumn = "yes"
|
||||||
vim.opt.isfname:append("@-@")
|
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.
|
-- Give more space for displaying messages.
|
||||||
vim.opt.cmdheight = 1
|
vim.opt.cmdheight = 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue