Skip to content

Commit 4b0f97e

Browse files
authored
Merge branch 'master' into master
2 parents d94d8d0 + 6ba2408 commit 4b0f97e

File tree

4 files changed

+37
-27
lines changed

4 files changed

+37
-27
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: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -98,73 +98,78 @@ vim.opt.linebreak = true
9898
vim.opt.showbreak = ''
9999

100100
-- [[ Setting options ]]
101-
-- See `:help vim.opt`
101+
-- See `:help vim.o`
102102
-- NOTE: You can change these options as you wish!
103103
-- For more options, you can see `:help option-list`
104104

105105
-- Make line numbers default
106-
vim.opt.number = true
106+
vim.o.number = true
107107
-- You can also add relative line numbers, to help with jumping.
108108
-- Experiment for yourself to see if you like it!
109-
vim.opt.relativenumber = true
109+
-- vim.o.relativenumber = true
110110

111111
-- Enable mouse mode, can be useful for resizing splits for example!
112-
vim.opt.mouse = 'a'
112+
vim.o.mouse = 'a'
113113

114114
-- Don't show the mode, since it's already in the status line
115-
vim.opt.showmode = false
115+
vim.o.showmode = false
116116

117117
-- Sync clipboard between OS and Neovim.
118118
-- Schedule the setting after `UiEnter` because it can increase startup-time.
119119
-- Remove this option if you want your OS clipboard to remain independent.
120120
-- See `:help 'clipboard'`
121121
vim.schedule(function()
122-
vim.opt.clipboard = 'unnamedplus'
122+
vim.o.clipboard = 'unnamedplus'
123123
end)
124124

125125
-- Enable break indent
126-
vim.opt.breakindent = true
126+
vim.o.breakindent = true
127127

128128
-- Save undo history
129-
vim.opt.undofile = true
129+
vim.o.undofile = true
130130

131131
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
132132
vim.opt.ignorecase = true
133133
vim.opt.smartcase = true
134134
vim.opt.smartindent = true
135135

136136
-- Keep signcolumn on by default
137-
vim.opt.signcolumn = 'yes'
137+
vim.o.signcolumn = 'yes'
138138

139139
-- Decrease update time
140-
vim.opt.updatetime = 250
140+
vim.o.updatetime = 250
141141

142142
-- Decrease mapped sequence wait time
143-
vim.opt.timeoutlen = 300
143+
vim.o.timeoutlen = 300
144144

145145
-- Configure how new splits should be opened
146-
vim.opt.splitright = true
147-
vim.opt.splitbelow = true
146+
vim.o.splitright = true
147+
vim.o.splitbelow = true
148148

149149
-- Sets how neovim will display certain whitespace characters in the editor.
150150
-- See `:help 'list'`
151151
-- and `:help 'listchars'`
152-
vim.opt.list = true
152+
--
153+
-- Notice listchars is set using `vim.opt` instead of `vim.o`.
154+
-- It is very similar to `vim.o` but offers an interface for conveniently interacting with tables.
155+
-- See `:help lua-options`
156+
-- and `:help lua-options-guide`
157+
vim.o.list = true
153158
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' }
154159

155160
-- Preview substitutions live, as you type!
156-
vim.opt.inccommand = 'split'
161+
vim.o.inccommand = 'split'
157162

158163
-- Show which line your cursor is on
159-
vim.opt.cursorline = true
164+
vim.o.cursorline = true
160165

161166
-- Minimal number of screen lines to keep above and below the cursor.
162167
vim.opt.scrolloff = 99999999
163168

164169
-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
165170
-- instead raise a dialog asking if you wish to save the current file(s)
166171
-- See `:help 'confirm'`
167-
vim.opt.confirm = true
172+
vim.o.confirm = true
168173

169174
-- [[ Basic Keymaps ]]
170175
-- See `:help vim.keymap.set()`
@@ -210,12 +215,12 @@ vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' }
210215

211216
-- Highlight when yanking (copying) text
212217
-- Try it with `yap` in normal mode
213-
-- See `:help vim.highlight.on_yank()`
218+
-- See `:help vim.hl.on_yank()`
214219
vim.api.nvim_create_autocmd('TextYankPost', {
215220
desc = 'Highlight when yanking (copying) text',
216221
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
217222
callback = function()
218-
vim.highlight.on_yank()
223+
vim.hl.on_yank()
219224
end,
220225
})
221226

@@ -228,8 +233,11 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
228233
if vim.v.shell_error ~= 0 then
229234
error('Error cloning lazy.nvim:\n' .. out)
230235
end
231-
end ---@diagnostic disable-next-line: undefined-field
232-
vim.opt.rtp:prepend(lazypath)
236+
end
237+
238+
---@type vim.Option
239+
local rtp = vim.opt.rtp
240+
rtp:prepend(lazypath)
233241

234242
-- [[ Configure and install plugins ]]
235243
--
@@ -244,7 +252,7 @@ vim.opt.rtp:prepend(lazypath)
244252
-- NOTE: Here is where you install your plugins.
245253
require('lazy').setup({
246254
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
247-
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
255+
'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically
248256

249257
-- NOTE: Plugins can also be added by using a table,
250258
-- with the first argument being the link and the following
@@ -300,7 +308,7 @@ require('lazy').setup({
300308
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
301309
opts = {
302310
-- delay between pressing a key and opening which-key (milliseconds)
303-
-- this setting is independent of vim.opt.timeoutlen
311+
-- this setting is independent of vim.o.timeoutlen
304312
delay = 0,
305313
icons = {
306314
-- set icon mappings to true if you have a Nerd Font
@@ -494,8 +502,8 @@ require('lazy').setup({
494502
-- Automatically install LSPs and related tools to stdpath for Neovim
495503
-- Mason must be loaded before its dependents so we need to set it up here.
496504
-- NOTE: `opts = {}` is the same as calling `require('mason').setup({})`
497-
{ 'williamboman/mason.nvim', opts = {} },
498-
'williamboman/mason-lspconfig.nvim',
505+
{ 'mason-org/mason.nvim', opts = {} },
506+
'mason-org/mason-lspconfig.nvim',
499507
'WhoIsSethDaniel/mason-tool-installer.nvim',
500508

501509
-- Useful status updates for LSP.

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 & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ return {
1313
command = 'Neotree current',
1414
})
1515
end,
16+
lazy = false,
1617
keys = {
1718
{ '<leader>e', ':Neotree toggle<CR>', { desc = 'NeoTree toggle' } },
1819
},

0 commit comments

Comments
 (0)