diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index 742e142..d95c5e1 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -1,21 +1,27 @@ { - "LuaSnip": { "branch": "master", "commit": "46c91e814732c1630b8a8b50d04acbf54b8320fa" }, + "LuaSnip": { "branch": "master", "commit": "f3b3d3446bcbfa62d638b1903ff00a78b2b730a1" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "kanagawa.nvim": { "branch": "master", "commit": "c19b9023842697ec92caf72cd3599f7dd7be4456" }, - "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, - "lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, + "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" }, + "indent-blankline.nvim": { "branch": "master", "commit": "821a7acd88587d966f7e464b0b3031dfe7f5680c" }, + "kanagawa.nvim": { "branch": "master", "commit": "ab41956c4559c3eb21e713fcdf54cda1cb6d5f40" }, + "lazy.nvim": { "branch": "main", "commit": "aedcd79811d491b60d0a6577a9c1701063c2a609" }, + "lspkind-nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, "lualine-lsp-progress": { "branch": "master", "commit": "56842d097245a08d77912edf5f2a69ba29f275d7" }, - "lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "6eb8cae80f2e4322ec82cd9f8fa423f6d1eb02c3" }, - "mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, - "nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" }, - "nvim-lspconfig": { "branch": "master", "commit": "90a28fd7637b66e055af62387ecee06f7cbd3173" }, - "nvim-treesitter": { "branch": "master", "commit": "075a64addc33390028ea124a1046a43497f05cd1" }, - "nvim-web-devicons": { "branch": "master", "commit": "3fafeea5f339223e888fd15eb4032260849cb038" }, + "lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "21d33d69a81f6351e5a5f49078b2e4f0075c8e73" }, + "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, + "neo-tree.nvim": { "branch": "main", "commit": "7d3b02073e59ed9ef271795787de76d0de8f5294" }, + "nui.nvim": { "branch": "main", "commit": "c3c7fd618dcb5a89e443a2e1033e7d11fdb0596b" }, + "nvim-autopairs": { "branch": "master", "commit": "1efb4f2e754d282762a1413ea0528d9a45143cdd" }, + "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, + "nvim-lspconfig": { "branch": "master", "commit": "b22610cc7ceb513396adb8e648abb1d1613b2a82" }, + "nvim-treesitter": { "branch": "master", "commit": "c06292fdc641d71d185d2f1a507ad8232b6cf528" }, + "nvim-web-devicons": { "branch": "master", "commit": "14ac5887110b06b89a96881d534230dac3ed134d" }, "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" }, - "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, - "telescope.nvim": { "branch": "master", "commit": "7011eaae0ac1afe036e30c95cf80200b8dc3f21a" } + "plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" }, + "telescope.nvim": { "branch": "master", "commit": "7011eaae0ac1afe036e30c95cf80200b8dc3f21a" }, + "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } } \ No newline at end of file diff --git a/nvim/lua/config/keybinds.lua b/nvim/lua/config/keybinds.lua index 5c48507..f179ce3 100644 --- a/nvim/lua/config/keybinds.lua +++ b/nvim/lua/config/keybinds.lua @@ -37,3 +37,5 @@ vim.keymap.set("v", "", "", { noremap=true }) -- Make Shift-Tab undo indent. vim.keymap.set("i", "", "") +-- NvimTree +vim.keymap.set("n", "e", ":NvimTreeToggle", { noremap=true }) diff --git a/nvim/lua/plugins/cmp.lua b/nvim/lua/plugins/cmp.lua index 447f790..1b2c0d7 100644 --- a/nvim/lua/plugins/cmp.lua +++ b/nvim/lua/plugins/cmp.lua @@ -38,7 +38,7 @@ return { fallback() end end, { "i", "s" }), - [''] = cmp.mapping.confirm({ select = false }), + [''] = cmp.mapping.confirm({ select = true }), }, formatting = { format = function(entry, vim_item) diff --git a/nvim/lua/plugins/gitsigns.lua b/nvim/lua/plugins/gitsigns.lua index 955407b..2c9cb41 100644 --- a/nvim/lua/plugins/gitsigns.lua +++ b/nvim/lua/plugins/gitsigns.lua @@ -3,9 +3,9 @@ return { lazy = false, opts = { signs = { - add = { text = '+' }, - delete = { text = '-' }, - change = { text = '~' }, + add = { text = '│' }, + delete = { text = '' }, + change = { text = '│' }, untracked = { text = '+'} }, }, diff --git a/nvim/lua/plugins/indent.lua b/nvim/lua/plugins/indent.lua new file mode 100644 index 0000000..5b4f38f --- /dev/null +++ b/nvim/lua/plugins/indent.lua @@ -0,0 +1,8 @@ +return { + "lukas-reineke/indent-blankline.nvim", + main = "ibl", + opts = {}, + config = function() + require("ibl").setup() + end +} diff --git a/nvim/lua/plugins/init.lua b/nvim/lua/plugins/init.lua index 7ae7768..f2d72b6 100644 --- a/nvim/lua/plugins/init.lua +++ b/nvim/lua/plugins/init.lua @@ -14,28 +14,29 @@ vim.opt.rtp:prepend(lazypath) require("lazy").setup({ -- Highlight - --{ import = "plugins.kodex" }, { import = "plugins.colortheme-kanagawa" }, + { import = "plugins.indent" }, + { import = "plugins.nvim-autopairs" }, + -- Filetree + { import = "plugins.neo-tree" }, + -- Status line { import = "plugins.lualine" }, -- Fuzzy finder - { import = "plugins.telescope" }, + { import = "plugins.telescope" }, -- Keybind helper - -- { import = "plugins.which-key" }, - + { import = "plugins.which-key" }, + -- Treesitter { import = "plugins.treesitter" }, - -- Complete - -- { import = "plugins.cmp" }, - -- LSP { import = "plugins.lsp" }, -- Git changes in gutter - --{ import = "plugins.gitsigns" }, + { import = "plugins.gitsigns" }, }) diff --git a/nvim/lua/plugins/lsp.lua b/nvim/lua/plugins/lsp.lua index f71e60b..afadf82 100644 --- a/nvim/lua/plugins/lsp.lua +++ b/nvim/lua/plugins/lsp.lua @@ -9,11 +9,11 @@ return { -- Setup Mason to automatically install LSP servers require('mason').setup() require('mason-lspconfig').setup({ automatic_installation = true }) - + local lspconfig = require('lspconfig') -- local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities()) -- PHP - require('lspconfig').intelephense.setup({ + lspconfig.intelephense.setup({ commands = { IntelephenseIndex = { function() vim.lsp.buf.execute_command({ command = 'intelephense.index.workspace' }) end, @@ -26,6 +26,8 @@ return { -- capabilities = capabilities }) + -- GO + lspconfig.gopls.setup({}) -- Tailwind CSS --require('lspconfig').tailwindcss.setup({ capabilities = capabilities }) diff --git a/nvim/lua/plugins/neo-tree.lua b/nvim/lua/plugins/neo-tree.lua new file mode 100644 index 0000000..b7b3e08 --- /dev/null +++ b/nvim/lua/plugins/neo-tree.lua @@ -0,0 +1,49 @@ +return { + 'nvim-neo-tree/neo-tree.nvim', + cmd = 'Neotree', + keys = { + { 'n', ':Neotree reveal toggle' }, + }, + dependencies = { + "MunifTanjim/nui.nvim", + "nvim-tree/nvim-web-devicons", + "nvim-lua/plenary.nvim", + }, + opts = { + close_if_last_window = true, + hide_root_node = true, + default_component_configs = { + indent = { + indent_size = 2, + padding = 1, + -- indent guides + with_markers = true, + indent_marker = "│", + last_indent_marker = "└", + }, + icon = { + folder_closed = "", + folder_open = "", + folder_empty = "󰜌", + }, + name = { + use_git_status_colors = true, + }, + git_status = { + symbols = { + -- Change type + added = "", + modified = "", + deleted = "✖", + renamed = "󰁕", + -- Status type + untracked = "", + ignored = "", + unstaged = "", + staged = "", + conflict = "", + } + }, + }, + } +} diff --git a/nvim/lua/plugins/nerdtree.lua b/nvim/lua/plugins/nerdtree.lua deleted file mode 100644 index 8ca081a..0000000 --- a/nvim/lua/plugins/nerdtree.lua +++ /dev/null @@ -1,2 +0,0 @@ -" Exit Vim if NERDTree is the only window remaining in the only tab. -autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif diff --git a/nvim/lua/plugins/nvim-autopairs.lua b/nvim/lua/plugins/nvim-autopairs.lua new file mode 100644 index 0000000..3a794db --- /dev/null +++ b/nvim/lua/plugins/nvim-autopairs.lua @@ -0,0 +1,5 @@ +return { + 'windwp/nvim-autopairs', + event = "InsertEnter", + opts = {} -- this is equalent to setup({}) function +} diff --git a/nvim/lua/plugins/which-key.lua b/nvim/lua/plugins/which-key.lua index 44f4780..adf21b5 100644 --- a/nvim/lua/plugins/which-key.lua +++ b/nvim/lua/plugins/which-key.lua @@ -5,10 +5,18 @@ return { vim.o.timeout = true vim.o.timeoutlen = 300 end, - opts = { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below - } + opts = {}, + config = function() + local wk = require("which-key") + + wk.register({ + f = { + name = "file", -- optional group name + f = { "Telescope find_files", "Find File" }, -- create a binding with label + n = { "New File" }, -- just a label. don't create any mapping + e = "Edit File" -- same as above + }, + }, { prefix = "" }) + end }