From fd68de0bf024377e84876ad7373c1151c3bab9ec Mon Sep 17 00:00:00 2001 From: Warwick New Date: Mon, 25 Nov 2024 14:21:01 +0000 Subject: [PATCH 1/3] Improved lazy bootstrap --- lua/core/plugins.lua | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/lua/core/plugins.lua b/lua/core/plugins.lua index 56713dc..8dd6347 100644 --- a/lua/core/plugins.lua +++ b/lua/core/plugins.lua @@ -1,13 +1,17 @@ +-- Bootstrap lazy.nvim local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - 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(lazypath) From 93af4c9813dcce49b33b7691ec25d9695fb44c15 Mon Sep 17 00:00:00 2001 From: Warwick New Date: Sun, 26 Jan 2025 11:40:54 +0000 Subject: [PATCH 2/3] Enabled tree sitter folds but left them disabled until used --- lua/core/defaults.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/core/defaults.lua b/lua/core/defaults.lua index 4731ec3..8107d4d 100644 --- a/lua/core/defaults.lua +++ b/lua/core/defaults.lua @@ -36,3 +36,8 @@ vim.cmd('language en_GB.utf8') -- vim.lsp.buf.format { async = false } -- end --}) + +-- Use treesitter for folds +vim.opt.foldmethod = "expr" +vim.opt.foldexpr = "nvim_treesitter#foldexpr()" +vim.opt.foldenable = false From 3777657f611ba3f530904191b8a4a5b035341719 Mon Sep 17 00:00:00 2001 From: Warwick New Date: Sun, 26 Jan 2025 13:54:42 +0000 Subject: [PATCH 3/3] Got rid of annoying British English reminders. --- lua/core/defaults.lua | 1 + lua/core/plugin_config/lsp_config.lua | 2 +- spell/en.utf-8.add | 2 -- spell/en.utf-8.add.spl | Bin 59 -> 0 bytes 4 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 spell/en.utf-8.add delete mode 100644 spell/en.utf-8.add.spl diff --git a/lua/core/defaults.lua b/lua/core/defaults.lua index 8107d4d..9e39877 100644 --- a/lua/core/defaults.lua +++ b/lua/core/defaults.lua @@ -28,6 +28,7 @@ vim.opt.conceallevel = 2 -- I want neovim to know I want british spellings vim.cmd('language en_GB.utf8') +vim.opt.spelllang='en_gb' -- Use LSP to format bufer automatically just before write --vim.api.nvim_create_autocmd("BufWritePre", { diff --git a/lua/core/plugin_config/lsp_config.lua b/lua/core/plugin_config/lsp_config.lua index 12f1644..328c8d1 100644 --- a/lua/core/plugin_config/lsp_config.lua +++ b/lua/core/plugin_config/lsp_config.lua @@ -75,7 +75,7 @@ require("lspconfig").lua_ls.setup { } require("lspconfig").clangd.setup { capabilities = capabilities } require("lspconfig").cmake.setup { capabilities = capabilities } -require("lspconfig").ltex.setup { capabilities = capabilities } +require("lspconfig").ltex.setup { capabilities = capabilities, settings = { ltex = { language = "en-GB" } } } require("lspconfig").ts_ls.setup { capabilities = capabilities } require("lspconfig").jsonls.setup { capabilities = capabilities } require("lspconfig").rust_analyzer.setup { capabilities = capabilities } diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add deleted file mode 100644 index 5f4025e..0000000 --- a/spell/en.utf-8.add +++ /dev/null @@ -1,2 +0,0 @@ -Rasterising -rasterisation diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl deleted file mode 100644 index 664fe615baee3d0e33422174b5a4499da93325ee..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 59 zcmWIZ^erw(&B-zP&%nT-%vi*j$XLu+!k7wVWil2sC1wISnT+|2d5jD|oX*I^1XKqB E0J7f;Jpcdz