@@ -135,7 +135,6 @@ vim.opt.signcolumn = 'yes'
135135vim .opt .updatetime = 250
136136
137137-- Decrease mapped sequence wait time
138- -- Displays which-key popup sooner
139138vim .opt .timeoutlen = 300
140139
141140-- Configure how new splits should be opened
@@ -267,19 +266,21 @@ require('lazy').setup({
267266 -- which loads which-key before all the UI elements are loaded. Events can be
268267 -- normal autocommands events (`:help autocmd-events`).
269268 --
270- -- Then, because we use the `config` key, the configuration only runs
271- -- after the plugin has been loaded:
272- -- config = function() ... end
269+ -- Then, because we use the `opts` key (recommended), the configuration runs
270+ -- after the plugin has been loaded as `require(MODULE).setup(opts)`.
273271
274272 { -- Useful plugin to show you pending keybinds.
275273 ' folke/which-key.nvim' ,
276274 event = ' VimEnter' , -- Sets the loading event to 'VimEnter'
277275 opts = {
276+ -- delay between pressing a key and opening which-key (milliseconds)
277+ -- this setting is independent of vim.opt.timeoutlen
278+ delay = 0 ,
278279 icons = {
279280 -- set icon mappings to true if you have a Nerd Font
280281 mappings = vim .g .have_nerd_font ,
281282 -- If you are using a Nerd Font: set icons.keys to an empty table which will use the
282- -- default whick -key.nvim defined Nerd Font icons, otherwise define a string table
283+ -- default which -key.nvim defined Nerd Font icons, otherwise define a string table
283284 keys = vim .g .have_nerd_font and {} or {
284285 Up = ' <Up> ' ,
285286 Down = ' <Down> ' ,
@@ -446,22 +447,22 @@ require('lazy').setup({
446447 opts = {
447448 library = {
448449 -- Load luvit types when the `vim.uv` word is found
449- { path = ' luvit-meta /library' , words = { ' vim%.uv' } },
450+ { path = ' ${3rd}/luv /library' , words = { ' vim%.uv' } },
450451 },
451452 },
452453 },
453- { ' Bilal2453/luvit-meta' , lazy = true },
454454 {
455455 -- Main LSP Configuration
456456 ' neovim/nvim-lspconfig' ,
457457 dependencies = {
458458 -- Automatically install LSPs and related tools to stdpath for Neovim
459- { ' williamboman/mason.nvim' , config = true }, -- NOTE: Must be loaded before dependants
459+ -- Mason must be loaded before its dependents so we need to set it up here.
460+ -- NOTE: `opts = {}` is the same as calling `require('mason').setup({})`
461+ { ' williamboman/mason.nvim' , opts = {} },
460462 ' williamboman/mason-lspconfig.nvim' ,
461463 ' WhoIsSethDaniel/mason-tool-installer.nvim' ,
462464
463465 -- Useful status updates for LSP.
464- -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
465466 { ' j-hui/fidget.nvim' , opts = {} },
466467
467468 -- Allows extra capabilities provided by nvim-cmp
@@ -588,6 +589,16 @@ require('lazy').setup({
588589 end ,
589590 })
590591
592+ -- Change diagnostic symbols in the sign column (gutter)
593+ -- if vim.g.have_nerd_font then
594+ -- local signs = { ERROR = '', WARN = '', INFO = '', HINT = '' }
595+ -- local diagnostic_signs = {}
596+ -- for type, icon in pairs(signs) do
597+ -- diagnostic_signs[vim.diagnostic.severity[type]] = icon
598+ -- end
599+ -- vim.diagnostic.config { signs = { text = diagnostic_signs } }
600+ -- end
601+
591602 -- LSP servers and clients are able to communicate to each other what features they support.
592603 -- By default, Neovim doesn't support everything that is in the LSP specification.
593604 -- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
@@ -619,8 +630,8 @@ require('lazy').setup({
619630 --
620631
621632 lua_ls = {
622- -- cmd = {...},
623- -- filetypes = { ...},
633+ -- cmd = { ... },
634+ -- filetypes = { ... },
624635 -- capabilities = {},
625636 settings = {
626637 Lua = {
@@ -635,13 +646,16 @@ require('lazy').setup({
635646 }
636647
637648 -- Ensure the servers and tools above are installed
638- -- To check the current status of installed tools and/or manually install
639- -- other tools, you can run
649+ --
650+ -- To check the current status of installed tools and/or manually install
651+ -- other tools, you can run
640652 -- :Mason
641653 --
642- -- You can press `g?` for help in this menu.
643- require (' mason' ).setup ()
644-
654+ -- You can press `g?` for help in this menu.
655+ --
656+ -- `mason` had to be setup earlier: to configure its options see the
657+ -- `dependencies` table for `nvim-lspconfig` above.
658+ --
645659 -- You can add other tools here that you want Mason to install
646660 -- for you, so that they are available from within Neovim.
647661 local ensure_installed = vim .tbl_keys (servers or {})
@@ -908,7 +922,7 @@ require('lazy').setup({
908922 -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
909923 },
910924
911- -- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the
925+ -- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the
912926 -- init.lua. If you want these files, they are in the repository, so you can just download them and
913927 -- place them in the correct locations.
914928
@@ -928,8 +942,12 @@ require('lazy').setup({
928942 -- This is the easiest way to modularize your config.
929943 --
930944 -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
931- -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
932945 -- { import = 'custom.plugins' },
946+ --
947+ -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
948+ -- Or use telescope!
949+ -- In normal mode type `<space>sh` then write `lazy.nvim-plugin`
950+ -- you can continue same window with `<space>sr` which resumes last telescope search
933951}, {
934952 ui = {
935953 -- If you are using a Nerd Font: set icons to an empty table which will use the
0 commit comments