Skip to content

Commit e1165ad

Browse files
Merge branch 'master' into master
2 parents 7851cfe + 6ba2408 commit e1165ad

File tree

4 files changed

+42
-31
lines changed

4 files changed

+42
-31
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: 38 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -94,72 +94,79 @@ vim.g.maplocalleader = ' '
9494
vim.g.have_nerd_font = false
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!
105-
vim.opt.relativenumber = true
105+
106+
vim.o.relativenumber = true
107+
106108

107109
-- Enable mouse mode, can be useful for resizing splits for example!
108-
vim.opt.mouse = 'a'
110+
vim.o.mouse = 'a'
109111

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

113115
-- Sync clipboard between OS and Neovim.
114116
-- Schedule the setting after `UiEnter` because it can increase startup-time.
115117
-- Remove this option if you want your OS clipboard to remain independent.
116118
-- See `:help 'clipboard'`
117119
vim.schedule(function()
118-
vim.opt.clipboard = 'unnamedplus'
120+
vim.o.clipboard = 'unnamedplus'
119121
end)
120122

121123
-- Enable break indent
122-
vim.opt.breakindent = true
124+
vim.o.breakindent = true
123125

124126
-- Save undo history
125-
vim.opt.undofile = true
127+
vim.o.undofile = true
126128

127129
-- 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
130+
vim.o.ignorecase = true
131+
vim.o.smartcase = true
130132

131133
-- Keep signcolumn on by default
132-
vim.opt.signcolumn = 'yes'
134+
vim.o.signcolumn = 'yes'
133135

134136
-- Decrease update time
135-
vim.opt.updatetime = 250
137+
vim.o.updatetime = 250
136138

137139
-- Decrease mapped sequence wait time
138-
vim.opt.timeoutlen = 300
140+
vim.o.timeoutlen = 300
139141

140142
-- Configure how new splits should be opened
141-
vim.opt.splitright = true
142-
vim.opt.splitbelow = true
143+
vim.o.splitright = true
144+
vim.o.splitbelow = true
143145

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

150157
-- Preview substitutions live, as you type!
151-
vim.opt.inccommand = 'split'
158+
vim.o.inccommand = 'split'
152159

153160
-- Show which line your cursor is on
154-
vim.opt.cursorline = true
161+
vim.o.cursorline = true
155162

156163
-- Minimal number of screen lines to keep above and below the cursor.
157-
vim.opt.scrolloff = 10
164+
vim.o.scrolloff = 10
158165

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

164171
-- [[ Basic Keymaps ]]
165172
-- See `:help vim.keymap.set()`
@@ -207,12 +214,12 @@ vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper win
207214

208215
-- Highlight when yanking (copying) text
209216
-- Try it with `yap` in normal mode
210-
-- See `:help vim.highlight.on_yank()`
217+
-- See `:help vim.hl.on_yank()`
211218
vim.api.nvim_create_autocmd('TextYankPost', {
212219
desc = 'Highlight when yanking (copying) text',
213220
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
214221
callback = function()
215-
vim.highlight.on_yank()
222+
vim.hl.on_yank()
216223
end,
217224
})
218225

@@ -225,8 +232,11 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
225232
if vim.v.shell_error ~= 0 then
226233
error('Error cloning lazy.nvim:\n' .. out)
227234
end
228-
end ---@diagnostic disable-next-line: undefined-field
229-
vim.opt.rtp:prepend(lazypath)
235+
end
236+
237+
---@type vim.Option
238+
local rtp = vim.opt.rtp
239+
rtp:prepend(lazypath)
230240

231241
-- [[ Configure and install plugins ]]
232242
--
@@ -241,7 +251,7 @@ vim.opt.rtp:prepend(lazypath)
241251
-- NOTE: Here is where you install your plugins.
242252
require('lazy').setup({
243253
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
244-
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
254+
'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically
245255

246256
-- NOTE: Plugins can also be added by using a table,
247257
-- with the first argument being the link and the following
@@ -297,7 +307,7 @@ require('lazy').setup({
297307
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
298308
opts = {
299309
-- delay between pressing a key and opening which-key (milliseconds)
300-
-- this setting is independent of vim.opt.timeoutlen
310+
-- this setting is independent of vim.o.timeoutlen
301311
delay = 0,
302312
icons = {
303313
-- set icon mappings to true if you have a Nerd Font
@@ -476,8 +486,8 @@ require('lazy').setup({
476486
-- Automatically install LSPs and related tools to stdpath for Neovim
477487
-- Mason must be loaded before its dependents so we need to set it up here.
478488
-- NOTE: `opts = {}` is the same as calling `require('mason').setup({})`
479-
{ 'williamboman/mason.nvim', opts = {} },
480-
'williamboman/mason-lspconfig.nvim',
489+
{ 'mason-org/mason.nvim', opts = {} },
490+
'mason-org/mason-lspconfig.nvim',
481491
'WhoIsSethDaniel/mason-tool-installer.nvim',
482492

483493
-- Useful status updates for LSP.

lua/kickstart/plugins/lint.lua

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