diff --git a/README.md b/README.md index 35e0967f..95d08e9d 100644 --- a/README.md +++ b/README.md @@ -84,13 +84,13 @@ git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HO If you're using `cmd.exe`: ``` -git clone https://github.com/nvim-lua/kickstart.nvim.git %localappdata%\nvim\ +git clone https://github.com/nvim-lua/kickstart.nvim.git "%localappdata%\nvim" ``` If you're using `powershell.exe` ``` -git clone https://github.com/nvim-lua/kickstart.nvim.git $env:LOCALAPPDATA\nvim\ +git clone https://github.com/nvim-lua/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim" ``` diff --git a/init.lua b/init.lua index 2ff67ae8..efebfdfc 100644 --- a/init.lua +++ b/init.lua @@ -212,29 +212,22 @@ require('lazy').setup { { 'ThePrimeagen/harpoon', config = function() - local mark = require 'harpoon.mark' - local ui = require 'harpoon.ui' + + local mark = require('harpoon.mark') + local ui = require('harpoon.ui') + -- Keybindings vim.keymap.set('n', 'a', mark.add_file, { desc = 'Harpoon: Add file' }) vim.keymap.set('n', '', ui.toggle_quick_menu, { desc = 'Harpoon: Toggle menu' }) -- Navigate to Harpoon marks - vim.keymap.set('n', '', function() - ui.nav_file(1) - end, { desc = 'Harpoon: Go to file 1' }) - vim.keymap.set('n', '', function() - ui.nav_file(2) - end, { desc = 'Harpoon: Go to file 2' }) - vim.keymap.set('n', '', function() - ui.nav_file(3) - end, { desc = 'Harpoon: Go to file 3' }) - vim.keymap.set('n', '', function() - ui.nav_file(4) - end, { desc = 'Harpoon: Go to file 4' }) - end, + vim.keymap.set('n', '', function() ui.nav_file(1) end, { desc = 'Harpoon: Go to file 1' }) + vim.keymap.set('n', '', function() ui.nav_file(2) end, { desc = 'Harpoon: Go to file 2' }) + vim.keymap.set('n', '', function() ui.nav_file(3) end, { desc = 'Harpoon: Go to file 3' }) + vim.keymap.set('n', '', function() ui.nav_file(4) end, { desc = 'Harpoon: Go to file 4' }) + end }, - { -- Fuzzy Finder (files, lsp, etc) 'nvim-telescope/telescope.nvim', event = 'VimEnter', @@ -409,8 +402,9 @@ require('lazy').setup { -- -- In this case, we create a function that lets us more easily define mappings specific -- for LSP related items. It sets the mode, buffer and description for us each time. - local map = function(keys, func, desc) - vim.keymap.set('n', keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc }) + local map = function(keys, func, desc, mode) + mode = mode or 'n' + vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc }) end -- Jump to the definition of the word under your cursor. @@ -444,7 +438,7 @@ require('lazy').setup { -- Execute a code action, usually your cursor needs to be on top of an error -- or a suggestion from your LSP for this to activate. - map('ca', vim.lsp.buf.code_action, '[C]ode [A]ction') + map('ca', vim.lsp.buf.code_action, '[C]ode [A]ction', { 'n', 'x' }) -- WARN: This is not Goto Definition, this is Goto Declaration. -- For example, in C this would take you to the header. @@ -518,8 +512,8 @@ require('lazy').setup { -- Some languages (like typescript) have entire language plugins that can be useful: -- https://github.com/pmizio/typescript-tools.nvim -- - -- But for many setups, the LSP (`tsserver`) will work just fine - -- tsserver = {}, + -- But for many setups, the LSP (`ts_ls`) will work just fine + -- ts_ls = {}, -- lua_ls = { @@ -560,7 +554,7 @@ require('lazy').setup { local server = servers[server_name] or {} -- This handles overriding only values explicitly passed -- by the server configuration above. Useful when disabling - -- certain features of an LSP (for example, turning off formatting for tsserver) + -- certain features of an LSP (for example, turning off formatting for ts_ls) server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {}) require('lspconfig')[server_name].setup(server) end, @@ -568,7 +562,6 @@ require('lazy').setup { } end, }, - { -- Autoformat 'stevearc/conform.nvim', event = { 'BufWritePre' }, @@ -611,7 +604,7 @@ require('lazy').setup { }, }, }, -} +}) -- Set colorscheme to catppuccin-macchinato vim.cmd.colorscheme 'catppuccin-macchiato' diff --git a/lua/kickstart/plugins/neo-tree.lua b/lua/kickstart/plugins/neo-tree.lua index f126d68a..bd442269 100644 --- a/lua/kickstart/plugins/neo-tree.lua +++ b/lua/kickstart/plugins/neo-tree.lua @@ -11,7 +11,7 @@ return { }, cmd = 'Neotree', keys = { - { '\\', ':Neotree reveal', desc = 'NeoTree reveal' }, + { '\\', ':Neotree reveal', desc = 'NeoTree reveal', silent = true }, }, opts = { filesystem = {