@@ -114,9 +114,7 @@ vim.o.showmode = false
114114-- Schedule the setting after `UiEnter` because it can increase startup-time.
115115-- Remove this option if you want your OS clipboard to remain independent.
116116-- See `:help 'clipboard'`
117- vim .schedule (function ()
118- vim .o .clipboard = ' unnamedplus'
119- end )
117+ vim .schedule (function () vim .o .clipboard = ' unnamedplus' end )
120118
121119-- Enable break indent
122120vim .o .breakindent = true
@@ -214,9 +212,7 @@ vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper win
214212vim .api .nvim_create_autocmd (' TextYankPost' , {
215213 desc = ' Highlight when yanking (copying) text' ,
216214 group = vim .api .nvim_create_augroup (' kickstart-highlight-yank' , { clear = true }),
217- callback = function ()
218- vim .hl .on_yank ()
219- end ,
215+ callback = function () vim .hl .on_yank () end ,
220216})
221217
222218-- [[ Install `lazy.nvim` plugin manager ]]
@@ -225,9 +221,7 @@ local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
225221if not (vim .uv or vim .loop ).fs_stat (lazypath ) then
226222 local lazyrepo = ' https://github.com/folke/lazy.nvim.git'
227223 local out = vim .fn .system { ' git' , ' clone' , ' --filter=blob:none' , ' --branch=stable' , lazyrepo , lazypath }
228- if vim .v .shell_error ~= 0 then
229- error (' Error cloning lazy.nvim:\n ' .. out )
230- end
224+ if vim .v .shell_error ~= 0 then error (' Error cloning lazy.nvim:\n ' .. out ) end
231225end
232226
233227--- @type vim.Option
@@ -249,13 +243,6 @@ require('lazy').setup({
249243 -- NOTE: Plugins can be added via a link or github org/name. To run setup automatically, use `opts = {}`
250244 { ' NMAC427/guess-indent.nvim' , opts = {} },
251245
252- -- NOTE: Plugins can also be added by using a table,
253- -- with the first argument being the link and the following
254- -- keys can be used to configure plugin behavior/loading/etc.
255- --
256- -- Use `opts = {}` to automatically pass options to a plugin's `setup()` function, forcing the plugin to be loaded.
257- --
258-
259246 -- Alternatively, use `config = function() ... end` for full control over the configuration.
260247 -- If you prefer to call `setup` explicitly, use:
261248 -- {
@@ -300,47 +287,11 @@ require('lazy').setup({
300287
301288 { -- Useful plugin to show you pending keybinds.
302289 ' folke/which-key.nvim' ,
303- event = ' VimEnter' , -- Sets the loading event to 'VimEnter'
290+ event = ' VimEnter' ,
304291 opts = {
305292 -- delay between pressing a key and opening which-key (milliseconds)
306- -- this setting is independent of vim.o.timeoutlen
307293 delay = 0 ,
308- icons = {
309- -- set icon mappings to true if you have a Nerd Font
310- mappings = vim .g .have_nerd_font ,
311- -- If you are using a Nerd Font: set icons.keys to an empty table which will use the
312- -- default which-key.nvim defined Nerd Font icons, otherwise define a string table
313- keys = vim .g .have_nerd_font and {} or {
314- Up = ' <Up> ' ,
315- Down = ' <Down> ' ,
316- Left = ' <Left> ' ,
317- Right = ' <Right> ' ,
318- C = ' <C-…> ' ,
319- M = ' <M-…> ' ,
320- D = ' <D-…> ' ,
321- S = ' <S-…> ' ,
322- CR = ' <CR> ' ,
323- Esc = ' <Esc> ' ,
324- ScrollWheelDown = ' <ScrollWheelDown> ' ,
325- ScrollWheelUp = ' <ScrollWheelUp> ' ,
326- NL = ' <NL> ' ,
327- BS = ' <BS> ' ,
328- Space = ' <Space> ' ,
329- Tab = ' <Tab> ' ,
330- F1 = ' <F1>' ,
331- F2 = ' <F2>' ,
332- F3 = ' <F3>' ,
333- F4 = ' <F4>' ,
334- F5 = ' <F5>' ,
335- F6 = ' <F6>' ,
336- F7 = ' <F7>' ,
337- F8 = ' <F8>' ,
338- F9 = ' <F9>' ,
339- F10 = ' <F10>' ,
340- F11 = ' <F11>' ,
341- F12 = ' <F12>' ,
342- },
343- },
294+ icons = { mappings = vim .g .have_nerd_font },
344295
345296 -- Document existing key chains
346297 spec = {
@@ -382,9 +333,7 @@ require('lazy').setup({
382333
383334 -- `cond` is a condition used to determine whether this plugin should be
384335 -- installed and loaded.
385- cond = function ()
386- return vim .fn .executable ' make' == 1
387- end ,
336+ cond = function () return vim .fn .executable ' make' == 1 end ,
388337 },
389338 { ' nvim-telescope/telescope-ui-select.nvim' },
390339
@@ -497,17 +446,20 @@ require('lazy').setup({
497446
498447 -- It's also possible to pass additional configuration options.
499448 -- See `:help telescope.builtin.live_grep()` for information about particular keys
500- vim .keymap .set (' n' , ' <leader>s/' , function ()
501- builtin .live_grep {
502- grep_open_files = true ,
503- prompt_title = ' Live Grep in Open Files' ,
504- }
505- end , { desc = ' [S]earch [/] in Open Files' })
449+ vim .keymap .set (
450+ ' n' ,
451+ ' <leader>s/' ,
452+ function ()
453+ builtin .live_grep {
454+ grep_open_files = true ,
455+ prompt_title = ' Live Grep in Open Files' ,
456+ }
457+ end ,
458+ { desc = ' [S]earch [/] in Open Files' }
459+ )
506460
507461 -- Shortcut for searching your Neovim configuration files
508- vim .keymap .set (' n' , ' <leader>sn' , function ()
509- builtin .find_files { cwd = vim .fn .stdpath ' config' }
510- end , { desc = ' [S]earch [N]eovim files' })
462+ vim .keymap .set (' n' , ' <leader>sn' , function () builtin .find_files { cwd = vim .fn .stdpath ' config' } end , { desc = ' [S]earch [N]eovim files' })
511463 end ,
512464 },
513465
@@ -618,9 +570,7 @@ require('lazy').setup({
618570 --
619571 -- This may be unwanted, since they displace some of your code
620572 if client and client :supports_method (' textDocument/inlayHint' , event .buf ) then
621- map (' <leader>th' , function ()
622- vim .lsp .inlay_hint .enable (not vim .lsp .inlay_hint .is_enabled { bufnr = event .buf })
623- end , ' [T]oggle Inlay [H]ints' )
573+ map (' <leader>th' , function () vim .lsp .inlay_hint .enable (not vim .lsp .inlay_hint .is_enabled { bufnr = event .buf }) end , ' [T]oggle Inlay [H]ints' )
624574 end
625575 end ,
626576 })
@@ -695,9 +645,7 @@ require('lazy').setup({
695645 on_init = function (client )
696646 if client .workspace_folders then
697647 local path = client .workspace_folders [1 ].name
698- if path ~= vim .fn .stdpath ' config' and (vim .uv .fs_stat (path .. ' /.luarc.json' ) or vim .uv .fs_stat (path .. ' /.luarc.jsonc' )) then
699- return
700- end
648+ if path ~= vim .fn .stdpath ' config' and (vim .uv .fs_stat (path .. ' /.luarc.json' ) or vim .uv .fs_stat (path .. ' /.luarc.jsonc' )) then return end
701649 end
702650
703651 client .config .settings .Lua = vim .tbl_deep_extend (' force' , client .config .settings .Lua , {
@@ -731,9 +679,7 @@ require('lazy').setup({
731679 keys = {
732680 {
733681 ' <leader>f' ,
734- function ()
735- require (' conform' ).format { async = true , lsp_format = ' fallback' }
736- end ,
682+ function () require (' conform' ).format { async = true , lsp_format = ' fallback' } end ,
737683 mode = ' ' ,
738684 desc = ' [F]ormat buffer' ,
739685 },
@@ -778,9 +724,7 @@ require('lazy').setup({
778724 -- Build Step is needed for regex support in snippets.
779725 -- This step is not supported in many windows environments.
780726 -- Remove the below condition to re-enable on windows.
781- if vim .fn .has ' win32' == 1 or vim .fn .executable ' make' == 0 then
782- return
783- end
727+ if vim .fn .has ' win32' == 1 or vim .fn .executable ' make' == 0 then return end
784728 return ' make install_jsregexp'
785729 end )(),
786730 dependencies = {
@@ -914,9 +858,7 @@ require('lazy').setup({
914858 -- default behavior. For example, here we set the section for
915859 -- cursor location to LINE:COLUMN
916860 --- @diagnostic disable-next-line : duplicate-set-field
917- statusline .section_location = function ()
918- return ' %2l:%-2v'
919- end
861+ statusline .section_location = function () return ' %2l:%-2v' end
920862
921863 -- ... and there is more!
922864 -- Check out: https://github.com/nvim-mini/mini.nvim
@@ -929,9 +871,7 @@ require('lazy').setup({
929871 require (' nvim-treesitter' ).install (filetypes )
930872 vim .api .nvim_create_autocmd (' FileType' , {
931873 pattern = filetypes ,
932- callback = function ()
933- vim .treesitter .start ()
934- end ,
874+ callback = function () vim .treesitter .start () end ,
935875 })
936876 end ,
937877 },
0 commit comments