summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2023-07-15 01:49:53 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2023-07-15 01:49:53 +0530
commit52264cfdf74e4b3d84b860d53250c866ac72f0a1 (patch)
tree75d62547100590fa3e331e159446c7c87cc6e88f /.config
parenta8ea70cb0592f207f22dfb9e3beb2603adbd9ebf (diff)
nvim: Adding nvim-comment
Diffstat (limited to '.config')
-rw-r--r--.config/nvim/init.lua1
-rw-r--r--.config/nvim/lua/justsaumit/nvim-comment-config.lua5
-rw-r--r--.config/nvim/lua/justsaumit/nvim-tree-config.lua2
-rw-r--r--.config/nvim/lua/justsaumit/plugins.lua3
-rw-r--r--.config/nvim/lua/justsaumit/telescope-config.lua2
-rw-r--r--.config/nvim/plugin/packer_compiled.lua5
6 files changed, 16 insertions, 2 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua
index 0f2c159..c24a27d 100644
--- a/.config/nvim/init.lua
+++ b/.config/nvim/init.lua
@@ -10,4 +10,5 @@ require("justsaumit.lastplace-config")
require("justsaumit.which-key-config")
require("justsaumit.colorizer-config")
require("justsaumit.telescope-config")
+require("justsaumit.nvim-comment-config")
print ("while(!(succeed = try() ) );")
diff --git a/.config/nvim/lua/justsaumit/nvim-comment-config.lua b/.config/nvim/lua/justsaumit/nvim-comment-config.lua
new file mode 100644
index 0000000..d71ce14
--- /dev/null
+++ b/.config/nvim/lua/justsaumit/nvim-comment-config.lua
@@ -0,0 +1,5 @@
+require('nvim_comment').setup({
+ line_mapping = "<leader>cl",
+ operator_mapping = "<leader>c",
+ comment_empty = false
+})
diff --git a/.config/nvim/lua/justsaumit/nvim-tree-config.lua b/.config/nvim/lua/justsaumit/nvim-tree-config.lua
index c83a1b7..b499f91 100644
--- a/.config/nvim/lua/justsaumit/nvim-tree-config.lua
+++ b/.config/nvim/lua/justsaumit/nvim-tree-config.lua
@@ -6,7 +6,7 @@ vim.g.loaded_netrwPlugin = 1
vim.opt.termguicolors = true
-- empty setup using defaults
-require("nvim-tree").setup()
+-- require("nvim-tree").setup()
-- OR setup with some options
require("nvim-tree").setup({
diff --git a/.config/nvim/lua/justsaumit/plugins.lua b/.config/nvim/lua/justsaumit/plugins.lua
index ae8b42b..c4649fe 100644
--- a/.config/nvim/lua/justsaumit/plugins.lua
+++ b/.config/nvim/lua/justsaumit/plugins.lua
@@ -82,6 +82,9 @@ return packer.startup(function(use)
-- snippets
-- use "L3MON4D3/LuaSnip" --snippet engine
-- use "rafamadriz/friendly-snippets" -- a bunch of snippets to use
+--
+-- Comments - Toggle comments in Neovim
+ use "terrortylor/nvim-comment"
--Autopairs for HTML
--use {"windwp/nvim-autopairs", wants = "nvim-treesitter", module = { "nvim-autopairs.completion.cmp", "nvim-autopairs" }, config = function()
diff --git a/.config/nvim/lua/justsaumit/telescope-config.lua b/.config/nvim/lua/justsaumit/telescope-config.lua
index e678792..534e663 100644
--- a/.config/nvim/lua/justsaumit/telescope-config.lua
+++ b/.config/nvim/lua/justsaumit/telescope-config.lua
@@ -20,7 +20,7 @@ require('telescope').setup {
layout_strategy = "horizontal",
file_sorter = require'telescope.sorters'.get_fuzzy_file,
file_ignore_patterns = {
- "node_modules", "build", "dist", "yarn.lock", ".local", ".rustup", ".mozilla",".git"
+ "node_modules", "build", "dist", "yarn.lock", ".local", ".cargo", ".rustup", ".mozilla",".git"
},
generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter,
path_display = {},
diff --git a/.config/nvim/plugin/packer_compiled.lua b/.config/nvim/plugin/packer_compiled.lua
index 7d9da10..8f4534b 100644
--- a/.config/nvim/plugin/packer_compiled.lua
+++ b/.config/nvim/plugin/packer_compiled.lua
@@ -94,6 +94,11 @@ _G.packer_plugins = {
path = "/home/saumit/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua",
url = "https://github.com/NvChad/nvim-colorizer.lua"
},
+ ["nvim-comment"] = {
+ loaded = true,
+ path = "/home/saumit/.local/share/nvim/site/pack/packer/start/nvim-comment",
+ url = "https://github.com/terrortylor/nvim-comment"
+ },
["nvim-lastplace"] = {
loaded = true,
path = "/home/saumit/.local/share/nvim/site/pack/packer/start/nvim-lastplace",