mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
Merge branch 'LazyVim:main' into feature/neoconf-spec
This commit is contained in:
commit
e181228ebf
8 changed files with 57 additions and 41 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 July 25
|
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 August 29
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
Table of Contents *LazyVim-table-of-contents*
|
Table of Contents *LazyVim-table-of-contents*
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,9 @@ vim.api.nvim_create_autocmd("TextYankPost", {
|
||||||
vim.api.nvim_create_autocmd({ "VimResized" }, {
|
vim.api.nvim_create_autocmd({ "VimResized" }, {
|
||||||
group = augroup("resize_splits"),
|
group = augroup("resize_splits"),
|
||||||
callback = function()
|
callback = function()
|
||||||
|
local current_tab = vim.fn.tabpagenr()
|
||||||
vim.cmd("tabdo wincmd =")
|
vim.cmd("tabdo wincmd =")
|
||||||
|
vim.cmd("tabnext " .. current_tab)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,8 +66,6 @@ map(
|
||||||
{ desc = "Redraw / clear hlsearch / diff update" }
|
{ desc = "Redraw / clear hlsearch / diff update" }
|
||||||
)
|
)
|
||||||
|
|
||||||
map({ "n", "x" }, "gw", "*N", { desc = "Search word under cursor" })
|
|
||||||
|
|
||||||
-- https://github.com/mhinz/vim-galore#saner-behavior-of-n-and-n
|
-- https://github.com/mhinz/vim-galore#saner-behavior-of-n-and-n
|
||||||
map("n", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
|
map("n", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
|
||||||
map("x", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
|
map("x", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
|
||||||
|
|
@ -82,7 +80,7 @@ map("i", ".", ".<c-g>u")
|
||||||
map("i", ";", ";<c-g>u")
|
map("i", ";", ";<c-g>u")
|
||||||
|
|
||||||
-- save file
|
-- save file
|
||||||
map({ "i", "v", "n", "s" }, "<C-s>", "<cmd>w<cr><esc>", { desc = "Save file" })
|
map({ "i", "x", "n", "s" }, "<C-s>", "<cmd>w<cr><esc>", { desc = "Save file" })
|
||||||
|
|
||||||
--keywordprg
|
--keywordprg
|
||||||
map("n", "<leader>K", "<cmd>norm! K<cr>", { desc = "Keywordprg" })
|
map("n", "<leader>K", "<cmd>norm! K<cr>", { desc = "Keywordprg" })
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ return {
|
||||||
lazy = true,
|
lazy = true,
|
||||||
config = function() end,
|
config = function() end,
|
||||||
opts = {
|
opts = {
|
||||||
extensions = {
|
|
||||||
inlay_hints = {
|
inlay_hints = {
|
||||||
inline = false,
|
inline = false,
|
||||||
},
|
},
|
||||||
|
|
@ -41,7 +40,6 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
|
|
||||||
-- Correctly setup lspconfig for clangd 🚀
|
-- Correctly setup lspconfig for clangd 🚀
|
||||||
{
|
{
|
||||||
|
|
@ -56,7 +54,6 @@ return {
|
||||||
root_dir = function(fname)
|
root_dir = function(fname)
|
||||||
return require("lspconfig.util").root_pattern(
|
return require("lspconfig.util").root_pattern(
|
||||||
"Makefile",
|
"Makefile",
|
||||||
"CMakeLists.txt",
|
|
||||||
"configure.ac",
|
"configure.ac",
|
||||||
"configure.in",
|
"configure.in",
|
||||||
"config.h.in",
|
"config.h.in",
|
||||||
|
|
@ -90,7 +87,7 @@ return {
|
||||||
clangd = function(_, opts)
|
clangd = function(_, opts)
|
||||||
local clangd_ext_opts = require("lazyvim.util").opts("clangd_extensions.nvim")
|
local clangd_ext_opts = require("lazyvim.util").opts("clangd_extensions.nvim")
|
||||||
require("clangd_extensions").setup(vim.tbl_deep_extend("force", clangd_ext_opts or {}, { server = opts }))
|
require("clangd_extensions").setup(vim.tbl_deep_extend("force", clangd_ext_opts or {}, { server = opts }))
|
||||||
return true
|
return false
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ return {
|
||||||
pyright = {},
|
pyright = {},
|
||||||
ruff_lsp = {},
|
ruff_lsp = {},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
setup = {
|
setup = {
|
||||||
ruff_lsp = function()
|
ruff_lsp = function()
|
||||||
require("lazyvim.util").on_attach(function(client, _)
|
require("lazyvim.util").on_attach(function(client, _)
|
||||||
|
|
@ -26,6 +25,7 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"nvim-neotest/neotest",
|
"nvim-neotest/neotest",
|
||||||
optional = true,
|
optional = true,
|
||||||
|
|
@ -61,7 +61,14 @@ return {
|
||||||
{
|
{
|
||||||
"linux-cultist/venv-selector.nvim",
|
"linux-cultist/venv-selector.nvim",
|
||||||
cmd = "VenvSelect",
|
cmd = "VenvSelect",
|
||||||
opts = {},
|
opts = {
|
||||||
|
name = {
|
||||||
|
"venv",
|
||||||
|
".venv",
|
||||||
|
"env",
|
||||||
|
".env",
|
||||||
|
},
|
||||||
|
},
|
||||||
keys = { { "<leader>cv", "<cmd>:VenvSelect<cr>", desc = "Select VirtualEnv" } },
|
keys = { { "<leader>cv", "<cmd>:VenvSelect<cr>", desc = "Select VirtualEnv" } },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,15 @@ return {
|
||||||
-- make sure mason installs the server
|
-- make sure mason installs the server
|
||||||
servers = {
|
servers = {
|
||||||
yamlls = {
|
yamlls = {
|
||||||
|
-- Have to add this for yamlls to understand that we support line folding
|
||||||
|
capabilities = {
|
||||||
|
textDocument = {
|
||||||
|
foldingRange = {
|
||||||
|
dynamicRegistration = false,
|
||||||
|
lineFoldingOnly = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
-- lazy-load schemastore when needed
|
-- lazy-load schemastore when needed
|
||||||
on_new_config = function(new_config)
|
on_new_config = function(new_config)
|
||||||
new_config.settings.yaml.schemas = new_config.settings.yaml.schemas or {}
|
new_config.settings.yaml.schemas = new_config.settings.yaml.schemas or {}
|
||||||
|
|
@ -33,11 +42,13 @@ return {
|
||||||
format = {
|
format = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
validate = { enable = true },
|
validate = true,
|
||||||
schemaStore = {
|
schemaStore = {
|
||||||
-- Must disable built-in schemaStore support to use
|
-- Must disable built-in schemaStore support to use
|
||||||
-- schemas from SchemaStore.nvim plugin
|
-- schemas from SchemaStore.nvim plugin
|
||||||
enable = false,
|
enable = false,
|
||||||
|
-- Avoid TypeError: Cannot read properties of undefined (reading 'length')
|
||||||
|
url = "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ return {
|
||||||
require("lspconfig")[server].setup(server_opts)
|
require("lspconfig")[server].setup(server_opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- get all the servers that are available thourgh mason-lspconfig
|
-- get all the servers that are available through mason-lspconfig
|
||||||
local have_mason, mlsp = pcall(require, "mason-lspconfig")
|
local have_mason, mlsp = pcall(require, "mason-lspconfig")
|
||||||
local all_mslp_servers = {}
|
local all_mslp_servers = {}
|
||||||
if have_mason then
|
if have_mason then
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ return {
|
||||||
"c",
|
"c",
|
||||||
"html",
|
"html",
|
||||||
"javascript",
|
"javascript",
|
||||||
|
"jsdoc",
|
||||||
"json",
|
"json",
|
||||||
"lua",
|
"lua",
|
||||||
"luadoc",
|
"luadoc",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue