Merge branch 'LazyVim:main' into feature/neoconf-spec

This commit is contained in:
Timothy Mertz 2023-08-29 13:53:29 -05:00 committed by GitHub
commit e181228ebf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 57 additions and 41 deletions

View file

@ -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*

View file

@ -22,7 +22,9 @@ vim.api.nvim_create_autocmd("TextYankPost", {
vim.api.nvim_create_autocmd({ "VimResized" }, {
group = augroup("resize_splits"),
callback = function()
local current_tab = vim.fn.tabpagenr()
vim.cmd("tabdo wincmd =")
vim.cmd("tabnext " .. current_tab)
end,
})

View file

@ -66,8 +66,6 @@ map(
{ 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
map("n", "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")
-- 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
map("n", "<leader>K", "<cmd>norm! K<cr>", { desc = "Keywordprg" })

View file

@ -15,7 +15,6 @@ return {
lazy = true,
config = function() end,
opts = {
extensions = {
inlay_hints = {
inline = false,
},
@ -41,7 +40,6 @@ return {
},
},
},
},
-- Correctly setup lspconfig for clangd 🚀
{
@ -56,7 +54,6 @@ return {
root_dir = function(fname)
return require("lspconfig.util").root_pattern(
"Makefile",
"CMakeLists.txt",
"configure.ac",
"configure.in",
"config.h.in",
@ -90,7 +87,7 @@ return {
clangd = function(_, opts)
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 }))
return true
return false
end,
},
},

View file

@ -14,7 +14,6 @@ return {
pyright = {},
ruff_lsp = {},
},
},
setup = {
ruff_lsp = function()
require("lazyvim.util").on_attach(function(client, _)
@ -26,6 +25,7 @@ return {
end,
},
},
},
{
"nvim-neotest/neotest",
optional = true,
@ -61,7 +61,14 @@ return {
{
"linux-cultist/venv-selector.nvim",
cmd = "VenvSelect",
opts = {},
opts = {
name = {
"venv",
".venv",
"env",
".env",
},
},
keys = { { "<leader>cv", "<cmd>:VenvSelect<cr>", desc = "Select VirtualEnv" } },
},
}

View file

@ -21,6 +21,15 @@ return {
-- make sure mason installs the server
servers = {
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
on_new_config = function(new_config)
new_config.settings.yaml.schemas = new_config.settings.yaml.schemas or {}
@ -33,11 +42,13 @@ return {
format = {
enable = true,
},
validate = { enable = true },
validate = true,
schemaStore = {
-- Must disable built-in schemaStore support to use
-- schemas from SchemaStore.nvim plugin
enable = false,
-- Avoid TypeError: Cannot read properties of undefined (reading 'length')
url = "",
},
},
},

View file

@ -166,7 +166,7 @@ return {
require("lspconfig")[server].setup(server_opts)
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 all_mslp_servers = {}
if have_mason then

View file

@ -34,6 +34,7 @@ return {
"c",
"html",
"javascript",
"jsdoc",
"json",
"lua",
"luadoc",