Skip to content

Commit 256e18a

Browse files
author
Andrew Cleveland
committed
AC - updated from main kickstart file
1 parent 1c03dd3 commit 256e18a

File tree

1 file changed

+44
-31
lines changed

1 file changed

+44
-31
lines changed

init.lua

Lines changed: 44 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -94,64 +94,77 @@ 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!
105-
-- vim.opt.relativenumber = true
105+
-- vim.o.relativenumber = true
106106

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

110110
-- Don't show the mode, since it's already in the status line
111-
vim.opt.showmode = false
111+
vim.o.showmode = false
112+
113+
-- Sync clipboard between OS and Neovim.
114+
-- Schedule the setting after `UiEnter` because it can increase startup-time.
115+
-- Remove this option if you want your OS clipboard to remain independent.
116+
-- See `:help 'clipboard'`
117+
vim.schedule(function()
118+
vim.o.clipboard = 'unnamedplus'
119+
end)
112120

113121
-- Enable break indent
114-
vim.opt.breakindent = true
122+
vim.o.breakindent = true
115123

116124
-- Save undo history
117-
vim.opt.undofile = true
125+
vim.o.undofile = true
118126

119127
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
120-
vim.opt.ignorecase = true
121-
vim.opt.smartcase = true
128+
vim.o.ignorecase = true
129+
vim.o.smartcase = true
122130

123131
-- Keep signcolumn on by default
124-
vim.opt.signcolumn = 'yes'
132+
vim.o.signcolumn = 'yes'
125133

126134
-- Decrease update time
127-
vim.opt.updatetime = 250
135+
vim.o.updatetime = 250
128136

129137
-- Decrease mapped sequence wait time
130-
vim.opt.timeoutlen = 300
138+
vim.o.timeoutlen = 300
131139

132140
-- Configure how new splits should be opened
133-
vim.opt.splitright = true
134-
vim.opt.splitbelow = true
141+
vim.o.splitright = true
142+
vim.o.splitbelow = true
135143

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

142155
-- Preview substitutions live, as you type!
143-
vim.opt.inccommand = 'split'
156+
vim.o.inccommand = 'split'
144157

145158
-- Show which line your cursor is on
146-
vim.opt.cursorline = true
159+
vim.o.cursorline = true
147160

148161
-- Minimal number of screen lines to keep above and below the cursor.
149-
vim.opt.scrolloff = 10
162+
vim.o.scrolloff = 10
150163

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

156169
-- [[ Basic Keymaps ]]
157170
-- See `:help vim.keymap.set()`
@@ -197,12 +210,12 @@ vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper win
197210

198211
-- Highlight when yanking (copying) text
199212
-- Try it with `yap` in normal mode
200-
-- See `:help vim.highlight.on_yank()`
213+
-- See `:help vim.hl.on_yank()`
201214
vim.api.nvim_create_autocmd('TextYankPost', {
202215
desc = 'Highlight when yanking (copying) text',
203216
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
204217
callback = function()
205-
vim.highlight.on_yank()
218+
vim.hl.on_yank()
206219
end,
207220
})
208221

@@ -290,7 +303,7 @@ require('lazy').setup({
290303
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
291304
opts = {
292305
-- delay between pressing a key and opening which-key (milliseconds)
293-
-- this setting is independent of vim.opt.timeoutlen
306+
-- this setting is independent of vim.o.timeoutlen
294307
delay = 0,
295308
icons = {
296309
-- set icon mappings to true if you have a Nerd Font
@@ -469,8 +482,8 @@ require('lazy').setup({
469482
-- Automatically install LSPs and related tools to stdpath for Neovim
470483
-- Mason must be loaded before its dependents so we need to set it up here.
471484
-- NOTE: `opts = {}` is the same as calling `require('mason').setup({})`
472-
{ 'williamboman/mason.nvim', opts = {} },
473-
'williamboman/mason-lspconfig.nvim',
485+
{ 'mason-org/mason.nvim', opts = {} },
486+
'mason-org/mason-lspconfig.nvim',
474487
'WhoIsSethDaniel/mason-tool-installer.nvim',
475488

476489
-- Useful status updates for LSP.
@@ -660,8 +673,8 @@ require('lazy').setup({
660673
local servers = {
661674
-- clangd = {},
662675
-- gopls = {},
663-
pyright = {},
664-
rust_analyzer = {},
676+
-- pyright = {},
677+
-- rust_analyzer = {},
665678
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
666679
--
667680
-- Some languages (like typescript) have entire language plugins that can be useful:
@@ -756,10 +769,10 @@ require('lazy').setup({
756769
formatters_by_ft = {
757770
lua = { 'stylua' },
758771
-- Conform can also run multiple formatters sequentially
759-
python = { 'isort', 'black' },
772+
-- python = { "isort", "black" },
760773
--
761774
-- You can use 'stop_after_first' to run the first available formatter from the list
762-
javascript = { 'prettierd', 'prettier' },
775+
-- javascript = { "prettierd", "prettier", stop_after_first = true },
763776
},
764777
},
765778
},
@@ -831,7 +844,7 @@ require('lazy').setup({
831844
appearance = {
832845
-- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
833846
-- Adjusts spacing to ensure icons are aligned
834-
nerd_font_variant = 'mono',
847+
nerd_font_variant = 'normal',
835848
},
836849

837850
completion = {
@@ -961,11 +974,11 @@ require('lazy').setup({
961974
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
962975
--
963976
-- require 'kickstart.plugins.debug',
964-
require 'kickstart.plugins.indent_line',
977+
-- require 'kickstart.plugins.indent_line',
965978
-- require 'kickstart.plugins.lint',
966979
-- require 'kickstart.plugins.autopairs',
967980
-- require 'kickstart.plugins.neo-tree',
968-
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
981+
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
969982

970983
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
971984
-- This is the easiest way to modularize your config.

0 commit comments

Comments
 (0)