This commit is contained in:
Ethan-S-Dev 2024-09-18 00:53:29 +03:00
commit b4a93bf5f5
3 changed files with 20 additions and 27 deletions

View File

@ -84,13 +84,13 @@ git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HO
If you're using `cmd.exe`: 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` 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"
``` ```
</details> </details>

View File

@ -212,29 +212,22 @@ require('lazy').setup {
{ {
'ThePrimeagen/harpoon', 'ThePrimeagen/harpoon',
config = function() config = function()
local mark = require 'harpoon.mark'
local ui = require 'harpoon.ui' local mark = require('harpoon.mark')
local ui = require('harpoon.ui')
-- Keybindings -- Keybindings
vim.keymap.set('n', '<leader>a', mark.add_file, { desc = 'Harpoon: Add file' }) vim.keymap.set('n', '<leader>a', mark.add_file, { desc = 'Harpoon: Add file' })
vim.keymap.set('n', '<C-e>', ui.toggle_quick_menu, { desc = 'Harpoon: Toggle menu' }) vim.keymap.set('n', '<C-e>', ui.toggle_quick_menu, { desc = 'Harpoon: Toggle menu' })
-- Navigate to Harpoon marks -- Navigate to Harpoon marks
vim.keymap.set('n', '<A-1>', function() vim.keymap.set('n', '<A-1>', function() ui.nav_file(1) end, { desc = 'Harpoon: Go to file 1' })
ui.nav_file(1) vim.keymap.set('n', '<A-2>', function() ui.nav_file(2) end, { desc = 'Harpoon: Go to file 2' })
end, { desc = 'Harpoon: Go to file 1' }) vim.keymap.set('n', '<A-3>', function() ui.nav_file(3) end, { desc = 'Harpoon: Go to file 3' })
vim.keymap.set('n', '<A-2>', function() vim.keymap.set('n', '<A-4>', function() ui.nav_file(4) end, { desc = 'Harpoon: Go to file 4' })
ui.nav_file(2) end
end, { desc = 'Harpoon: Go to file 2' })
vim.keymap.set('n', '<A-3>', function()
ui.nav_file(3)
end, { desc = 'Harpoon: Go to file 3' })
vim.keymap.set('n', '<A-4>', function()
ui.nav_file(4)
end, { desc = 'Harpoon: Go to file 4' })
end,
}, },
{ -- Fuzzy Finder (files, lsp, etc) { -- Fuzzy Finder (files, lsp, etc)
'nvim-telescope/telescope.nvim', 'nvim-telescope/telescope.nvim',
event = 'VimEnter', event = 'VimEnter',
@ -409,8 +402,9 @@ require('lazy').setup {
-- --
-- In this case, we create a function that lets us more easily define mappings specific -- 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. -- for LSP related items. It sets the mode, buffer and description for us each time.
local map = function(keys, func, desc) local map = function(keys, func, desc, mode)
vim.keymap.set('n', keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc }) mode = mode or 'n'
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
end end
-- Jump to the definition of the word under your cursor. -- 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 -- 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. -- or a suggestion from your LSP for this to activate.
map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction') map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction', { 'n', 'x' })
-- WARN: This is not Goto Definition, this is Goto Declaration. -- WARN: This is not Goto Definition, this is Goto Declaration.
-- For example, in C this would take you to the header. -- 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: -- Some languages (like typescript) have entire language plugins that can be useful:
-- https://github.com/pmizio/typescript-tools.nvim -- https://github.com/pmizio/typescript-tools.nvim
-- --
-- But for many setups, the LSP (`tsserver`) will work just fine -- But for many setups, the LSP (`ts_ls`) will work just fine
-- tsserver = {}, -- ts_ls = {},
-- --
lua_ls = { lua_ls = {
@ -560,7 +554,7 @@ require('lazy').setup {
local server = servers[server_name] or {} local server = servers[server_name] or {}
-- This handles overriding only values explicitly passed -- This handles overriding only values explicitly passed
-- by the server configuration above. Useful when disabling -- 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 {}) server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
require('lspconfig')[server_name].setup(server) require('lspconfig')[server_name].setup(server)
end, end,
@ -568,7 +562,6 @@ require('lazy').setup {
} }
end, end,
}, },
{ -- Autoformat { -- Autoformat
'stevearc/conform.nvim', 'stevearc/conform.nvim',
event = { 'BufWritePre' }, event = { 'BufWritePre' },
@ -611,7 +604,7 @@ require('lazy').setup {
}, },
}, },
}, },
} })
-- Set colorscheme to catppuccin-macchinato -- Set colorscheme to catppuccin-macchinato
vim.cmd.colorscheme 'catppuccin-macchiato' vim.cmd.colorscheme 'catppuccin-macchiato'

View File

@ -11,7 +11,7 @@ return {
}, },
cmd = 'Neotree', cmd = 'Neotree',
keys = { keys = {
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal' }, { '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
}, },
opts = { opts = {
filesystem = { filesystem = {