From 52264cfdf74e4b3d84b860d53250c866ac72f0a1 Mon Sep 17 00:00:00 2001 From: Saumit Dinesan Date: Sat, 15 Jul 2023 01:49:53 +0530 Subject: nvim: Adding nvim-comment --- .config/nvim/init.lua | 1 + .config/nvim/lua/justsaumit/nvim-comment-config.lua | 5 +++++ .config/nvim/lua/justsaumit/nvim-tree-config.lua | 2 +- .config/nvim/lua/justsaumit/plugins.lua | 3 +++ .config/nvim/lua/justsaumit/telescope-config.lua | 2 +- .config/nvim/plugin/packer_compiled.lua | 5 +++++ 6 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 .config/nvim/lua/justsaumit/nvim-comment-config.lua 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 = "cl", + operator_mapping = "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", -- cgit v1.2.3