diff --git a/lua/nat/lazy/comment.lua b/lua/nat/lazy/comment.lua new file mode 100644 index 0000000..d586e34 --- /dev/null +++ b/lua/nat/lazy/comment.lua @@ -0,0 +1,4 @@ +return { + "numToStr/Comment.nvim", + opts = function() require("Comment").setup({ }) end +} diff --git a/lua/nat/set.lua b/lua/nat/set.lua index 600428a..47cf06e 100644 --- a/lua/nat/set.lua +++ b/lua/nat/set.lua @@ -1,34 +1,45 @@ -vim.g.mapleader = "" +vim.g.mapleader = " " -vim.opt.guicursor = "" +local set = vim.opt +local HOME = "C:\\Users\\Nathan" -vim.opt.nu = true -vim.opt.relativenumber = true +set.guicursor = "" -vim.opt.tabstop = 2 -vim.opt.softtabstop = 2 -vim.opt.shiftwidth = 2 -vim.opt.expandtab = true +-- set.number = "relativenumber" +set.relativenumber = true -vim.opt.smartindent = true +set.tabstop = 2 +set.softtabstop = 2 +set.shiftwidth = 2 +set.expandtab = true -vim.opt.wrap = false +set.smartindent = true -vim.opt.swapfile = false -vim.opt.backup = false -vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" -vim.opt.undofile = true +set.wrap = false -vim.opt.hlsearch = false -vim.opt.incsearch = true +set.swapfile = false +set.backup = false +set.undodir = HOME .. "/.vim/undodir" +set.undofile = true -vim.opt.termguicolors = true +set.hlsearch = false +set.incsearch = true -vim.opt.scrolloff = 8 -vim.opt.signcolumn = "yes" -vim.opt.isfname:append("@-@") +set.termguicolors = true -vim.opt.updatetime = 50 +set.scrolloff = 8 +set.signcolumn = "yes" +set.isfname:append("@-@") -vim.opt.colorcolumn = "80" +set.updatetime = 50 +set.colorcolumn = "80" + +-- https://neovim.reddit.com/comments/xykklt/_/j4gxyqx +vim.keymap.set("n", "", function() + require('Comment.api').toggle.linewise.current() end, + { noremap = true, silent = true } +) + +vim.keymap.set("n", "tt", function() vim.cmd [[Neotree left toggle]] end) +vim.keymap.set("n", "tf", function() vim.cmd [[Neotree float]] end)