removed some comments
This commit is contained in:
parent
55849f4d90
commit
3c2f41a870
37
init.lua
37
init.lua
|
@ -8,42 +8,29 @@ vim.g.maplocalleader = ' '
|
|||
|
||||
vim.g.have_nerd_font = true
|
||||
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.tabstop = 4
|
||||
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
|
||||
vim.g.have_nerd_font = true
|
||||
|
||||
-- tabs appear as 4 spaces
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
|
||||
-- Make line numbers default
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.signcolumn = 'yes'
|
||||
|
||||
vim.opt.mouse = 'a'
|
||||
vim.opt.showmode = true
|
||||
|
||||
-- Supposedly reduces load time
|
||||
vim.schedule(function()
|
||||
vim.opt.clipboard = 'unnamedplus'
|
||||
end)
|
||||
|
||||
vim.opt.breakindent = true
|
||||
vim.opt.undofile = true
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
|
||||
vim.opt.undofile = true
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
|
||||
vim.opt.signcolumn = 'yes'
|
||||
|
||||
vim.opt.updatetime = 250
|
||||
vim.opt.timeoutlen = 300
|
||||
|
||||
vim.opt.splitright = true
|
||||
vim.opt.splitbelow = true
|
||||
|
||||
vim.opt.list = true
|
||||
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '·' }
|
||||
|
||||
|
@ -51,7 +38,6 @@ vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '·' }
|
|||
vim.opt.inccommand = 'split'
|
||||
|
||||
vim.opt.cursorline = true
|
||||
|
||||
vim.opt.scrolloff = 6
|
||||
|
||||
-- Clear highlights on search when pressing <Esc> in normal mode
|
||||
|
@ -60,9 +46,6 @@ vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
|||
-- Diagnostic keymaps
|
||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
|
||||
|
||||
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
|
||||
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
|
||||
-- is not what someone will guess without a bit more experience.
|
||||
-- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
|
||||
-- or just use <C-\><C-n> to exit terminal mode
|
||||
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
||||
|
@ -77,6 +60,7 @@ vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right win
|
|||
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
||||
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
||||
|
||||
-- highlight 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 }),
|
||||
|
@ -85,6 +69,7 @@ vim.api.nvim_create_autocmd('TextYankPost', {
|
|||
end,
|
||||
})
|
||||
|
||||
-- bootstrap lazy
|
||||
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
|
||||
|
@ -96,11 +81,9 @@ end ---@diagnostic disable-next-line: undefined-field
|
|||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
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
|
||||
'tpope/vim-sleuth',
|
||||
|
||||
-- See `:help gitsigns` to understand what the configuration keys do
|
||||
{ -- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||
{
|
||||
'lewis6991/gitsigns.nvim',
|
||||
opts = {
|
||||
signs = {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"debugpy": { "branch": "main", "commit": "02723de14048aaa414cd4be01268b0a0f4c786ad" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "a0abbf18084b77d28bc70e24752e4f4fd54aea17" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "2eaa30537365f6889c850bd46ef6f18ddf8fac70" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "d8f26efd456190241afd1b0f5235fe6fdba13d4a" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "8620f82ee3f59ff2187647167b6b47387a13a018" },
|
||||
"luvit-meta": { "branch": "main", "commit": "55709f183b0742a7e4f47688c284f81148ad4dc0" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "97d9f1d3ad205dece6bcafd1d71cf1507608f3c7" },
|
||||
|
|
Loading…
Reference in New Issue