Skip to content

Commit a5ec49a

Browse files
committed
Manually add some changes from upstream
1 parent f71bc60 commit a5ec49a

File tree

4 files changed

+57
-53
lines changed

4 files changed

+57
-53
lines changed

init.lua

Lines changed: 54 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -16,65 +16,66 @@ vim.g.maplocalleader = '\\'
1616
vim.g.have_nerd_font = true
1717

1818
-- [[ Setting options ]]
19-
-- See `:help vim.opt`
19+
-- See `:help vim.o`
2020
-- NOTE: You can change these options as you wish!
2121
-- For more options, you can see `:help option-list`
2222

2323
-- new in 0.11+
2424
-- vim.o.winborder = 'rounded'
2525

2626
-- Make line numbers default
27-
vim.opt.number = true
27+
vim.o.number = true
2828
-- You can also add relative line numbers, to help with jumping.
2929
-- Experiment for yourself to see if you like it!
30-
-- vim.opt.relativenumber = true
30+
-- vim.o.relativenumber = true
3131

3232
-- Enable mouse mode, can be useful for resizing splits for example!
33-
vim.opt.mouse = 'a'
33+
vim.o.mouse = 'a'
3434

3535
-- Don't show the mode, since it's already in the status line
36-
vim.opt.showmode = false
36+
vim.o.showmode = false
3737

3838
vim.opt.completeopt = { 'menu', 'menuone', 'noselect', 'noinsert', 'popup' }
3939

4040
-- Use system clipboard for copy/yank operations, but don't override it when pasting
4141
vim.opt.clipboard:append 'unnamed' -- use * register
42-
-- vim.opt.clipboard:append('unnamedplus') -- use + register (not needed on macOS as * and + are the same)
42+
-- vim.o.clipboard:append('unnamedplus') -- use + register (not needed on macOS as * and + are the same)
4343

4444
-- Preserve clipboard when pasting in visual mode
4545
vim.keymap.set('x', 'p', '"_dP')
4646

4747
-- views can only be fully collapsed with the global statusline
48-
vim.opt.laststatus = 3
48+
vim.o.laststatus = 3
4949

5050
-- Enable break indent
51-
vim.opt.breakindent = true
51+
vim.o.breakindent = true
5252

5353
-- Save undo history
54-
vim.opt.undofile = true
55-
vim.opt.ul = 500 -- undolevel
54+
vim.o.undofile = true
55+
vim.o.ul = 500 -- undolevel
5656

5757
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
58-
vim.opt.ignorecase = true
59-
vim.opt.smartcase = true
58+
vim.o.ignorecase = true
59+
vim.o.smartcase = true
6060

6161
-- Keep signcolumn on by default
62-
vim.opt.signcolumn = 'yes'
62+
vim.o.signcolumn = 'yes'
6363

6464
-- Decrease update time
65-
vim.opt.updatetime = 250
65+
vim.o.updatetime = 250
6666

6767
-- Decrease mapped sequence wait time
68-
vim.opt.timeoutlen = 300
68+
vim.o.timeoutlen = 300
6969

7070
-- Configure how new splits should be opened
71-
vim.opt.splitright = true
72-
vim.opt.splitbelow = true
73-
74-
-- Sets how neovim will display certain whitespace characters in the editor.
75-
-- See `:help 'list'`
76-
-- and `:help 'listchars'`
77-
vim.opt.list = true
71+
vim.o.splitright = true
72+
vim.o.splitbelow = true
73+
74+
-- Notice listchars is set using `vim.opt` instead of `vim.o`.
75+
-- It is very similar to `vim.o` but offers an interface for conveniently interacting with tables.
76+
-- See `:help lua-options`
77+
-- and `:help lua-options-guide`vim.o.list = true
78+
vim.o.list = true
7879
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' }
7980

8081
vim.opt_local.tabstop = 2
@@ -85,10 +86,10 @@ vim.opt_local.expandtab = true
8586
vim.api.nvim_create_autocmd('FileType', {
8687
pattern = 'go',
8788
callback = function()
88-
vim.opt_local.tabstop = 4
89-
vim.opt_local.shiftwidth = 4
90-
vim.opt_local.expandtab = false
91-
vim.opt.listchars = { tab = ' ', trail = '·', nbsp = '' }
89+
vim.o_local.tabstop = 4
90+
vim.o_local.shiftwidth = 4
91+
vim.o_local.expandtab = false
92+
vim.o.listchars = { tab = ' ', trail = '·', nbsp = '' }
9293
vim.cmd 'iabbrev dl :='
9394
end,
9495
})
@@ -97,45 +98,45 @@ vim.api.nvim_create_autocmd('FileType', {
9798
vim.api.nvim_create_autocmd('FileType', {
9899
pattern = 'json',
99100
callback = function()
100-
vim.opt_local.tabstop = 2
101-
vim.opt_local.shiftwidth = 2
102-
vim.opt_local.expandtab = false
101+
vim.o_local.tabstop = 2
102+
vim.o_local.shiftwidth = 2
103+
vim.o_local.expandtab = false
103104
end,
104105
})
105106

106107
-- But Ruby is no better
107108
vim.api.nvim_create_autocmd('FileType', {
108109
pattern = 'ruby',
109110
callback = function()
110-
vim.opt_local.indentkeys:remove { '.', '0{' }
111+
vim.o_local.indentkeys:remove { '.', '0{' }
111112
end,
112113
})
113114

114115
-- Preview substitutions live, as you type!
115-
vim.opt.inccommand = 'split'
116+
vim.o.inccommand = 'split'
116117

117118
-- Show which line your cursor is on
118-
vim.opt.cursorline = false
119+
vim.o.cursorline = false
119120

120121
-- Minimal number of screen lines to keep above and below the cursor.
121-
vim.opt.scrolloff = 10
122+
vim.o.scrolloff = 10
122123

123124
-- ests sefalsettings
124-
vim.opt.directory = '/tmp/vim/swap'
125-
vim.opt.writebackup = true
126-
vim.opt.backup = true
127-
vim.opt.backupcopy = 'auto'
128-
vim.opt.backupdir = '/tmp/vim/backup'
129-
vim.opt.undofile = true
130-
vim.opt.undodir = '/tmp/vim/undo'
131-
vim.opt.viewdir = '/tmp/vim/viewdir'
132-
vim.opt.conceallevel = 0
125+
vim.o.directory = '/tmp/vim/swap'
126+
vim.o.writebackup = true
127+
vim.o.backup = true
128+
vim.o.backupcopy = 'auto'
129+
vim.o.backupdir = '/tmp/vim/backup'
130+
vim.o.undofile = true
131+
vim.o.undodir = '/tmp/vim/undo'
132+
vim.o.viewdir = '/tmp/vim/viewdir'
133+
vim.o.conceallevel = 0
133134
-- hybrid relativenumbers
134135
vim.o.relativenumber = true
135136
-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
136137
-- instead raise a dialog asking if you wish to save the current file(s)
137138
-- See `:help 'confirm'`
138-
vim.opt.confirm = true
139+
vim.o.confirm = true
139140

140141
-- [[ Basic Keymaps ]]
141142
-- See `:help vim.keymap.set()`
@@ -187,12 +188,12 @@ vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper win
187188

188189
-- Highlight when yanking (copying) text
189190
-- Try it with `yap` in normal mode
190-
-- See `:help vim.highlight.on_yank()`
191+
-- See `:help vim.hl.on_yank()`
191192
vim.api.nvim_create_autocmd('TextYankPost', {
192193
desc = 'Highlight when yanking (copying) text',
193194
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
194195
callback = function()
195-
vim.highlight.on_yank()
196+
vim.hl.on_yank()
196197
end,
197198
})
198199

@@ -205,8 +206,11 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
205206
if vim.v.shell_error ~= 0 then
206207
error('Error cloning lazy.nvim:\n' .. out)
207208
end
208-
end ---@diagnostic disable-next-line: undefined-field
209-
vim.opt.rtp:prepend(lazypath)
209+
end
210+
211+
---@type vim.Option
212+
local rtp = vim.opt.rtp
213+
rtp:prepend(lazypath)
210214

211215
-- [[ Configure and install plugins ]]
212216
--
@@ -279,7 +283,7 @@ require('lazy').setup({
279283
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
280284
opts = {
281285
-- delay between pressing a key and opening which-key (milliseconds)
282-
-- this setting is independent of vim.opt.timeoutlen
286+
-- this setting is independent of vim.o.timeoutlen
283287
delay = 0,
284288
icons = {
285289
-- set icon mappings to true if you have a Nerd Font
@@ -466,8 +470,8 @@ require('lazy').setup({
466470
-- Automatically install LSPs and related tools to stdpath for Neovim
467471
-- Mason must be loaded before its dependents so we need to set it up here.
468472
-- NOTE: `opts = {}` is the same as calling `require('mason').setup({})`
469-
{ 'williamboman/mason.nvim', opts = {} },
470-
'williamboman/mason-lspconfig.nvim',
473+
{ 'mason-org/mason.nvim', opts = {} },
474+
'mason-org/mason-lspconfig.nvim',
471475
'WhoIsSethDaniel/mason-tool-installer.nvim',
472476

473477
-- Useful status updates for LSP.

lua/kickstart/plugins/debug.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ return {
1818
'nvim-neotest/nvim-nio',
1919

2020
-- Installs the debug adapters for you
21-
'williamboman/mason.nvim',
21+
'mason-org/mason.nvim',
2222
'jay-babu/mason-nvim-dap.nvim',
2323

2424
-- Add your own debuggers here

lua/kickstart/plugins/lint.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ return {
5050
-- Only run the linter in buffers that you can modify in order to
5151
-- avoid superfluous noise, notably within the handy LSP pop-ups that
5252
-- describe the hovered symbol using Markdown.
53-
if vim.opt_local.modifiable:get() then
53+
if vim.bo.modifiable then
5454
lint.try_lint()
5555
end
5656
end,

lua/kickstart/plugins/neo-tree.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ return {
99
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
1010
'MunifTanjim/nui.nvim',
1111
},
12-
cmd = 'Neotree',
12+
lazy = false,
1313
keys = {
1414
{ '<leader>\\', '<cmd>Neotree toggle focus last float<CR>', desc = 'NeoTree toggle', silent = true },
1515
{ '<C-n>', '<cmd>Neotree toggle focus last left<CR>', desc = 'NeoTree toggle', silent = true },

0 commit comments

Comments
 (0)