Compare commits

...
10 Commits
Author SHA1 Message Date
alvinlollo b468cbf4f0 Added/modified to liking 2026-08-10 21:29:05 +10:00
Adrian WilkinsandAdrian Wilkins 803bc181d7 docs: Explain more about how to add and remove autocmds (#105)
Co-authored-by: Adrian Wilkins <adrian.wilkins.contractor@dvla.gov.uk>
2024-12-11 17:56:39 +01:00
Iordanis Petkakis 7a10a75dc3 docs: fix lualine component example (#95)
As per https://github.com/LazyVim/LazyVim/issues/4544 it creates
confusion to the users who are just trying out the example to try things
out. Better to avoid such misinterpretations in the future.

I'm assuming this will also update the docs automatically as I can
deduce from
https://github.com/LazyVim/lazyvim.github.io/blob/25af26046a30be110f0aa19c87ad2a1a1e53ce45/lua/build.lua#L369-L372?
2024-10-22 11:11:31 +02:00
Folke Lemaitre cb6349c8ae fix: disable lazy checker notify by default 2024-07-20 23:30:46 +02:00
Folke Lemaitre 79b3f27f5c fix: add error handling to initial clone 2024-07-03 10:19:46 +02:00
Folke Lemaitre 0c370f4d5c docs: removed supertab example 2024-06-18 07:11:16 +02:00
LucasandFolke Lemaitre cb79b0e6a9 fix: improve comment about extras loading in config (#75)
* fix: improve comment about extras loading in config

* fix: use LazyExtras

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-06-14 10:14:39 +02:00
DrummyFloyd 4818e4b72f fix: removed unnecessary env var (#67)
according to https://github.com/LazyVim/LazyVim/issues/2063#issuecomment-2143841592
this is not needed
2024-06-02 17:00:03 +02:00
Alex Ford b59e7c315b docs: Update example plugin file to use native snippets with supertab. (#66) 2024-05-19 09:33:42 +02:00
denartha10 75625b29e8 fix: Deperecated syntax in bootstrapping of LazyVim starter (#56)
In the current state of the lazy.nvim repository, certain updates have been made. However, there remains an outdated reference to 'vim.loop' for the bootstrapping process of 'lazyvim' in this start repo for LazyVim, despite 'vim.loop' being deprecated. To rectify this, I suggest a minor alteration by replacing it with the following code snippet:

```lua
if not (vim.uv or vim.loop).fs_stat(lazypath) then
    -- bootstrap
do
```
2024-03-29 17:53:46 +01:00
4 changed files with 51 additions and 63 deletions
+5
View File
@@ -1,3 +1,8 @@
-- Autocmds are automatically loaded on the VeryLazy event
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
--
-- Add any additional autocmds here
-- with `vim.api.nvim_create_autocmd`
--
-- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults)
-- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell")
+17 -10
View File
@@ -1,19 +1,23 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
-- bootstrap lazy.nvim
-- stylua: ignore
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
spec = {
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- import any extras modules here
-- { import = "lazyvim.plugins.extras.lang.typescript" },
-- { import = "lazyvim.plugins.extras.lang.json" },
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
-- import/override with your plugins
{ import = "plugins" },
},
@@ -27,7 +31,10 @@ require("lazy").setup({
-- version = "*", -- try installing the latest stable version for plugins that support semver
},
install = { colorscheme = { "tokyonight", "habamax" } },
checker = { enabled = true }, -- automatically check for plugin updates
checker = {
enabled = true, -- check for plugin updates periodically
notify = false, -- notify on update
}, -- automatically check for plugin updates
performance = {
rtp = {
-- disable some rtp plugins
+24
View File
@@ -1,3 +1,27 @@
-- Options are automatically loaded before lazy.nvim startup
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here
-- SpellCheck
-- Filter diagnostics to hide warnings but keep errors, info, and hints
local function filter_warnings(diagnostic)
return diagnostic.severity ~= vim.diagnostic.severity.WARN
end
vim.diagnostic.config({
virtual_text = {
format = function(diagnostic)
if diagnostic.severity == vim.diagnostic.severity.WARN then
return ""
end
return diagnostic.message
end,
},
signs = {
filter = filter_warnings,
},
underline = {
filter = filter_warnings,
},
})
+5 -53
View File
@@ -157,7 +157,11 @@ return {
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
opts = function(_, opts)
table.insert(opts.sections.lualine_x, "😄")
table.insert(opts.sections.lualine_x, {
function()
return "😄"
end,
})
end,
},
@@ -190,56 +194,4 @@ return {
},
},
},
-- Use <tab> for completion and snippets (supertab)
-- first: disable default <tab> and <s-tab> behavior in LuaSnip
{
"L3MON4D3/LuaSnip",
keys = function()
return {}
end,
},
-- then: setup supertab in cmp
{
"hrsh7th/nvim-cmp",
dependencies = {
"hrsh7th/cmp-emoji",
},
---@param opts cmp.ConfigSchema
opts = function(_, opts)
local has_words_before = function()
unpack = unpack or table.unpack
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
local luasnip = require("luasnip")
local cmp = require("cmp")
opts.mapping = vim.tbl_extend("force", opts.mapping, {
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
-- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
-- this way you will only jump inside the snippet region
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
})
end,
},
}