diff --git a/.config/nvim/lua/null/plugins/file-explorer.lua b/.config/nvim/lua/null/plugins/file-explorer.lua new file mode 100644 index 0000000..eec63d8 --- /dev/null +++ b/.config/nvim/lua/null/plugins/file-explorer.lua @@ -0,0 +1,29 @@ +return { + { + "nvim-neo-tree/neo-tree.nvim", -- I'll be using oil.nvim, but for better visual I'll keep this + keys = { + { "", "Neotree toggle", desc = "NeoTree" }, + }, + branch = "v3.x", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", + "MunifTanjim/nui.nvim", + }, + config = function () + require("neo-tree").setup({ + close_if_last_window = true, + }) + end, + }, + { + "stevearc/oil.nvim", + keys = { + { "-", "Oil", desc = "Oil" }, + }, + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function () + require("oil").setup() + end + }, +} diff --git a/.config/nvim/lua/null/plugins/init.lua b/.config/nvim/lua/null/plugins/init.lua index 689e8e0..1d7b48d 100644 --- a/.config/nvim/lua/null/plugins/init.lua +++ b/.config/nvim/lua/null/plugins/init.lua @@ -21,33 +21,13 @@ return { end, }, { - "nvim-neo-tree/neo-tree.nvim", -- I'll be using oil.nvim, but for better visual I'll keep this + "tpope/vim-commentary", -- shortcut to comment a line keys = { - { "", "Neotree toggle", desc = "NeoTree" }, + { "gcc", mode = "n" }, + { "gc", mode = "v" }, + { "gcc", mode = "i" }, }, - branch = "v3.x", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", - "MunifTanjim/nui.nvim", - }, - config = function () - require("neo-tree").setup({ - close_if_last_window = true, - }) - end, }, - { - "stevearc/oil.nvim", - keys = { - { "-", "Oil", desc = "Oil" }, - }, - dependencies = { "nvim-tree/nvim-web-devicons" }, - config = function () - require("oil").setup() - end - }, - "tpope/vim-commentary", -- shortcut to comment a line { "dstein64/vim-startuptime", cmd = "StartupTime", -- Note to self: lazy load on command @@ -55,34 +35,4 @@ return { -- Note to self: init is called during startup. Configuration for vim plugins typically should be set in an init function end, }, - - -- Syntax Highlighting stuff - { - "nvim-treesitter/nvim-treesitter", - opts = { - ensure_installed = { - "gsp", - }, - - highlight = { - enable = true, - additional_vim_regex_highlighting = false, - }, - }, - config = function (_, opts) - local config = require("nvim-treesitter.parsers").get_parser_configs() - config.gsp = { - install_info = { - url = "https://git.sr.ht/~mango/tree-sitter-gsp", - files = {"src/parser.c"}, - }, - filetype = "gsp", - } - require("nvim-treesitter.configs").setup(opts) - end - }, - { - url = "https://git.sr.ht/~mango/tree-sitter-gsp", - fp = "gsp", - }, } diff --git a/.config/nvim/lua/null/plugins/treesitter.lua b/.config/nvim/lua/null/plugins/treesitter.lua new file mode 100644 index 0000000..36be552 --- /dev/null +++ b/.config/nvim/lua/null/plugins/treesitter.lua @@ -0,0 +1,30 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { + "gsp", + }, + + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, + }, + config = function (_, opts) + local config = require("nvim-treesitter.parsers").get_parser_configs() + config.gsp = { + install_info = { + url = "https://git.sr.ht/~mango/tree-sitter-gsp", + files = {"src/parser.c"}, + }, + filetype = "gsp", + } + require("nvim-treesitter.configs").setup(opts) + end + }, + { + url = "https://git.sr.ht/~mango/tree-sitter-gsp", + fp = "gsp", + }, +}