|
|
|
@ -3,6 +3,7 @@
|
|
|
|
|
vim.g.mapleader = ' '
|
|
|
|
|
vim.g.maplocalleader = ' '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Disables netrw for better file explorers
|
|
|
|
|
vim.g.loaded_netrw = 1
|
|
|
|
|
vim.g.loaded_netrwPlugin = 1
|
|
|
|
@ -77,12 +78,12 @@ vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper win
|
|
|
|
|
|
|
|
|
|
-- Highlight when yanking (copying) text
|
|
|
|
|
-- Try it with `yap` in normal mode
|
|
|
|
|
-- See `:help vim.highlight.on_yank()`
|
|
|
|
|
-- See `:help vim.hl.on_yank()`
|
|
|
|
|
vim.api.nvim_create_autocmd('TextYankPost', {
|
|
|
|
|
desc = 'Highlight when yanking (copying) text',
|
|
|
|
|
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
|
|
|
|
|
callback = function()
|
|
|
|
|
vim.highlight.on_yank()
|
|
|
|
|
vim.hl.on_yank()
|
|
|
|
|
end,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
@ -95,8 +96,11 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
|
|
|
|
if vim.v.shell_error ~= 0 then
|
|
|
|
|
error('Error cloning lazy.nvim:\n' .. out)
|
|
|
|
|
end
|
|
|
|
|
end ---@diagnostic disable-next-line: undefined-field
|
|
|
|
|
vim.opt.rtp:prepend(lazypath)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
---@type vim.Option
|
|
|
|
|
local rtp = vim.opt.rtp
|
|
|
|
|
rtp:prepend(lazypath)
|
|
|
|
|
|
|
|
|
|
-- [[ Configure and install plugins ]]
|
|
|
|
|
--
|
|
|
|
@ -111,7 +115,7 @@ vim.opt.rtp:prepend(lazypath)
|
|
|
|
|
-- NOTE: Here is where you install your plugins.
|
|
|
|
|
require('lazy').setup({
|
|
|
|
|
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
|
|
|
|
|
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
|
|
|
|
|
'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically
|
|
|
|
|
|
|
|
|
|
-- NOTE: Plugins can also be added by using a table,
|
|
|
|
|
-- with the first argument being the link and the following
|
|
|
|
@ -178,7 +182,7 @@ require('lazy').setup({
|
|
|
|
|
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
|
|
|
|
opts = {
|
|
|
|
|
-- delay between pressing a key and opening which-key (milliseconds)
|
|
|
|
|
-- this setting is independent of vim.opt.timeoutlen
|
|
|
|
|
-- this setting is independent of vim.o.timeoutlen
|
|
|
|
|
delay = 0,
|
|
|
|
|
icons = {
|
|
|
|
|
-- set icon mappings to true if you have a Nerd Font
|
|
|
|
@ -357,8 +361,8 @@ require('lazy').setup({
|
|
|
|
|
-- Automatically install LSPs and related tools to stdpath for Neovim
|
|
|
|
|
-- Mason must be loaded before its dependents so we need to set it up here.
|
|
|
|
|
-- NOTE: `opts = {}` is the same as calling `require('mason').setup({})`
|
|
|
|
|
{ 'williamboman/mason.nvim', opts = {} },
|
|
|
|
|
'williamboman/mason-lspconfig.nvim',
|
|
|
|
|
{ 'mason-org/mason.nvim', opts = {} },
|
|
|
|
|
'mason-org/mason-lspconfig.nvim',
|
|
|
|
|
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
|
|
|
|
|
|
|
|
|
-- Useful status updates for LSP.
|
|
|
|
|