diff --git a/init.lua b/init.lua index 0fd7f709..50636679 100644 --- a/init.lua +++ b/init.lua @@ -44,6 +44,14 @@ P.S. You can delete this when you're done too. It's your config now :) vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' +-- disable netrw at the very start of your init.lua +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 + +vim.opt.conceallevel = 1 + +vim.g.have_nerd_font = true + -- [[ Install `lazy.nvim` plugin manager ]] -- https://github.com/folke/lazy.nvim -- `:help lazy.nvim.txt` for more info @@ -113,7 +121,7 @@ require('lazy').setup({ }, -- Useful plugin to show you pending keybinds. - { 'folke/which-key.nvim', opts = {} }, + { 'folke/which-key.nvim', opts = {} }, { -- Adds git related signs to the gutter, as well as utilities for managing changes 'lewis6991/gitsigns.nvim', @@ -278,6 +286,7 @@ vim.o.hlsearch = true -- Make line numbers default vim.wo.number = true +vim.o.relativenumber = true -- Enable mouse mode vim.o.mouse = 'a' diff --git a/lazy-lock.json b/lazy-lock.json index 135656a2..49b452fe 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -14,11 +14,14 @@ "mason-lspconfig.nvim": { "branch": "main", "commit": "55716a879568a498fa236593c8119789054a3b8e" }, "mason.nvim": { "branch": "main", "commit": "3b5068f0fc565f337d67a2d315d935f574848ee7" }, "mini.pairs": { "branch": "main", "commit": "04f58f2545ed80ac3b52dd4826e93f33e15b2af6" }, + "neo-tree.nvim": { "branch": "main", "commit": "16d1b194376bf1fc2acd89ccb3c29ba8315bfcea" }, "neodev.nvim": { "branch": "main", "commit": "84e0290f5600e8b89c0dfcafc864f45496a53400" }, + "nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" }, "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, "nvim-lspconfig": { "branch": "master", "commit": "4bdd3800b4148f670c6cf55ef65f490148eeb550" }, "nvim-treesitter": { "branch": "master", "commit": "3ae78f376c2e721ce4feb23e9a5e8bc6062a2657" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "d2a4ffc22d9d38d44edb73da007b3cf43451e9b4" }, + "nvim-web-devicons": { "branch": "master", "commit": "3ee60deaa539360518eaab93a6c701fe9f4d82ef" }, "obsidian.nvim": { "branch": "main", "commit": "0f4ea504f51e3d1591e90184967c75503106a89b" }, "onedark.nvim": { "branch": "master", "commit": "1230aaf2a427b2c5b73aba6e4a9a5881d3e69429" }, "plenary.nvim": { "branch": "master", "commit": "f7adfc4b3f4f91aab6caebf42b3682945fbc35be" }, diff --git a/lua/custom/plugins/mini-pairs.lua b/lua/custom/plugins/mini-pairs.lua index 703d008e..0aa1dbf8 100644 --- a/lua/custom/plugins/mini-pairs.lua +++ b/lua/custom/plugins/mini-pairs.lua @@ -1,20 +1,20 @@ return { - "echasnovski/mini.pairs", - event = "VeryLazy", - opts = {}, - keys = { - { - "up", - function() - local Util = require("lazy.core.util") - vim.g.minipairs_disable = not vim.g.minipairs_disable - if vim.g.minipairs_disable then - Util.warn("Disabled auto pairs", { title = "Option" }) - else - Util.info("Enabled auto pairs", { title = "Option" }) - end - end, - desc = "Toggle auto pairs", - } + "echasnovski/mini.pairs", + event = "VeryLazy", + opts = {}, + keys = { + { + "up", + function() + local Util = require("lazy.core.util") + vim.g.minipairs_disable = not vim.g.minipairs_disable + if vim.g.minipairs_disable then + Util.warn("Disabled auto pairs", { title = "Option" }) + else + Util.info("Enabled auto pairs", { title = "Option" }) + end + end, + desc = "Toggle auto pairs", } + } } diff --git a/lua/custom/plugins/neo-tree.lua b/lua/custom/plugins/neo-tree.lua new file mode 100644 index 00000000..c3b8341c --- /dev/null +++ b/lua/custom/plugins/neo-tree.lua @@ -0,0 +1,74 @@ +return { + 'nvim-neo-tree/neo-tree.nvim', + version = '*', + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended + 'MunifTanjim/nui.nvim', + }, + config = function() + vim.keymap.set('n', '.', 'Neotree filesystem reveal float', { desc = 'Reveal File [.]' }) + vim.keymap.set('n', 'gs', 'Neotree git_status reveal float', { desc = 'Reveal [G]it [S]tatus' }) + + require('neo-tree').setup { + default_component_configs = { + icon = { + -- folder_closed = '+', + -- folder_open = '−', + -- folder_empty = '', + -- The next two settings are only a fallback, if you use nvim-web-devicons and configure default icons there + -- then these will never be used. + default = '*', + highlight = 'NeoTreeFileIcon', + }, + git_status = { + symbols = { + -- Change type + added = '', -- or "✚", but this is redundant info if you use git_status_colors on the name + modified = '', -- or "", but this is redundant info if you use git_status_colors on the name + -- deleted = '×', -- this can only be used in the git_status source + -- renamed = 'r', -- this can only be used in the git_status source + -- Status type + untracked = '??', + ignored = '', + unstaged = 'M', + staged = 'A', + conflict = '⁉︎', + }, + }, + }, + window = { + position = 'float', + mappings = { + ['a'] = { + 'add', + config = { + show_path = 'absolute', + }, + }, + + ['m'] = { + 'move', + config = { + show_path = 'absolute', + }, + }, + + ['c'] = { + 'copy', + config = { + show_path = 'absolute', + }, + }, + }, + }, + filesystem = { + use_libuv_file_watcher = true, + filtered_items = { + visible = true, + hide_dotfiles = false, + }, + }, + } + end, +}