Skip to content

Commit 2bb544b

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents aba284e + 3338d39 commit 2bb544b

File tree

5 files changed

+40
-32
lines changed

5 files changed

+40
-32
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ If you are experiencing issues, please make sure you have the latest versions.
2323

2424
External Requirements:
2525
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
26-
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation)
26+
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation),
27+
[fd-find](https://github.com/sharkdp/fd#installation)
2728
- Clipboard tool (xclip/xsel/win32yank or other depending on the platform)
2829
- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons
2930
- if you have it set `vim.g.have_nerd_font` in `init.lua` to true

init.lua

Lines changed: 35 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -94,72 +94,76 @@ vim.g.maplocalleader = ' '
9494
vim.g.have_nerd_font = true
9595

9696
-- [[ Setting options ]]
97-
-- See `:help vim.opt`
97+
-- See `:help vim.o`
9898
-- NOTE: You can change these options as you wish!
9999
-- For more options, you can see `:help option-list`
100100

101101
-- Make line numbers default
102-
vim.opt.number = true
102+
vim.o.number = true
103103
-- You can also add relative line numbers, to help with jumping.
104104
-- Experiment for yourself to see if you like it!
105105
vim.opt.relativenumber = true
106-
107106
-- Enable mouse mode, can be useful for resizing splits for example!
108-
vim.opt.mouse = 'a'
107+
vim.o.mouse = 'a'
109108

110109
-- Don't show the mode, since it's already in the status line
111-
vim.opt.showmode = false
110+
vim.o.showmode = false
112111

113112
-- Sync clipboard between OS and Neovim.
114113
-- Schedule the setting after `UiEnter` because it can increase startup-time.
115114
-- Remove this option if you want your OS clipboard to remain independent.
116115
-- See `:help 'clipboard'`
117116
vim.schedule(function()
118-
vim.opt.clipboard = 'unnamedplus'
117+
vim.o.clipboard = 'unnamedplus'
119118
end)
120119

121120
-- Enable break indent
122-
vim.opt.breakindent = true
121+
vim.o.breakindent = true
123122

124123
-- Save undo history
125-
vim.opt.undofile = true
124+
vim.o.undofile = true
126125

127126
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
128-
vim.opt.ignorecase = true
129-
vim.opt.smartcase = true
127+
vim.o.ignorecase = true
128+
vim.o.smartcase = true
130129

131130
-- Keep signcolumn on by default
132-
vim.opt.signcolumn = 'yes'
131+
vim.o.signcolumn = 'yes'
133132

134133
-- Decrease update time
135-
vim.opt.updatetime = 250
134+
vim.o.updatetime = 250
136135

137136
-- Decrease mapped sequence wait time
138-
vim.opt.timeoutlen = 300
137+
vim.o.timeoutlen = 300
139138

140139
-- Configure how new splits should be opened
141-
vim.opt.splitright = true
142-
vim.opt.splitbelow = true
140+
vim.o.splitright = true
141+
vim.o.splitbelow = true
143142

144143
-- Sets how neovim will display certain whitespace characters in the editor.
145144
-- See `:help 'list'`
146145
-- and `:help 'listchars'`
147-
vim.opt.list = true
146+
--
147+
-- Notice listchars is set using `vim.opt` instead of `vim.o`.
148+
-- It is very similar to `vim.o` but offers an interface for conveniently interacting with tables.
149+
-- See `:help lua-options`
150+
-- and `:help lua-options-guide`
151+
vim.o.list = true
148152
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' }
149153

150154
-- Preview substitutions live, as you type!
151-
vim.opt.inccommand = 'split'
155+
vim.o.inccommand = 'split'
152156

153157
-- Show which line your cursor is on
154-
vim.opt.cursorline = true
158+
vim.o.cursorline = true
155159

156160
-- Minimal number of screen lines to keep above and below the cursor.
157-
vim.opt.scrolloff = 10
161+
vim.o.scrolloff = 10
158162

159163
-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
160164
-- instead raise a dialog asking if you wish to save the current file(s)
161165
-- See `:help 'confirm'`
162-
vim.opt.confirm = true
166+
vim.o.confirm = true
163167

164168
-- [[ Basic Keymaps ]]
165169
-- See `:help vim.keymap.set()`
@@ -205,12 +209,12 @@ vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper win
205209

206210
-- Highlight when yanking (copying) text
207211
-- Try it with `yap` in normal mode
208-
-- See `:help vim.highlight.on_yank()`
212+
-- See `:help vim.hl.on_yank()`
209213
vim.api.nvim_create_autocmd('TextYankPost', {
210214
desc = 'Highlight when yanking (copying) text',
211215
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
212216
callback = function()
213-
vim.highlight.on_yank()
217+
vim.hl.on_yank()
214218
end,
215219
})
216220

@@ -223,8 +227,11 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
223227
if vim.v.shell_error ~= 0 then
224228
error('Error cloning lazy.nvim:\n' .. out)
225229
end
226-
end ---@diagnostic disable-next-line: undefined-field
227-
vim.opt.rtp:prepend(lazypath)
230+
end
231+
232+
---@type vim.Option
233+
local rtp = vim.opt.rtp
234+
rtp:prepend(lazypath)
228235

229236
-- [[ Configure and install plugins ]]
230237
--
@@ -239,7 +246,7 @@ vim.opt.rtp:prepend(lazypath)
239246
-- NOTE: Here is where you install your plugins.
240247
require('lazy').setup({
241248
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
242-
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
249+
'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically
243250

244251
-- NOTE: Plugins can also be added by using a table,
245252
-- with the first argument being the link and the following
@@ -295,7 +302,7 @@ require('lazy').setup({
295302
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
296303
opts = {
297304
-- delay between pressing a key and opening which-key (milliseconds)
298-
-- this setting is independent of vim.opt.timeoutlen
305+
-- this setting is independent of vim.o.timeoutlen
299306
delay = 0,
300307
icons = {
301308
-- set icon mappings to true if you have a Nerd Font
@@ -474,8 +481,8 @@ require('lazy').setup({
474481
-- Automatically install LSPs and related tools to stdpath for Neovim
475482
-- Mason must be loaded before its dependents so we need to set it up here.
476483
-- NOTE: `opts = {}` is the same as calling `require('mason').setup({})`
477-
{ 'williamboman/mason.nvim', opts = {} },
478-
'williamboman/mason-lspconfig.nvim',
484+
{ 'mason-org/mason.nvim', opts = {} },
485+
'mason-org/mason-lspconfig.nvim',
479486
'WhoIsSethDaniel/mason-tool-installer.nvim',
480487

481488
-- 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
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
1515
},

0 commit comments

Comments
 (0)