Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
1bf5f15b26 |
@ -1,6 +1,7 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
2
.github/.release-please-manifest.json
vendored
2
.github/.release-please-manifest.json
vendored
@ -1,3 +1,3 @@
|
||||
{
|
||||
".": "12.33.0"
|
||||
".": "12.28.0"
|
||||
}
|
||||
|
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@ -17,8 +17,6 @@ body:
|
||||
options:
|
||||
- label: I have read all the LazyVim docs
|
||||
required: true
|
||||
- label: I have updated the plugin to the latest version before submitting this issue
|
||||
required: true
|
||||
- label: I have searched the existing issues of LazyVim
|
||||
required: true
|
||||
- label: I have searched the existing issues of plugins related to this issue
|
||||
|
91
CHANGELOG.md
91
CHANGELOG.md
@ -1,96 +1,5 @@
|
||||
# Changelog
|
||||
|
||||
## [12.33.0](https://github.com/LazyVim/LazyVim/compare/v12.32.0...v12.33.0) (2024-07-19)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **extras:** improve ruby extra by letting user chose ([#3652](https://github.com/LazyVim/LazyVim/issues/3652)) ([7839498](https://github.com/LazyVim/LazyVim/commit/783949810855556dd12ed2685e62fb37a4c9504d))
|
||||
* **lang:** add Lean 4 support ([#4080](https://github.com/LazyVim/LazyVim/issues/4080)) ([3e29fdf](https://github.com/LazyVim/LazyVim/commit/3e29fdf478383034c48477dd04fd433a7c9327ee))
|
||||
* **lang:** add OCaml ([#4079](https://github.com/LazyVim/LazyVim/issues/4079)) ([a219e10](https://github.com/LazyVim/LazyVim/commit/a219e105b0e86316edfedb57f1fa267a764eab13))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ui:** trouble lualine component ([f9fdb35](https://github.com/LazyVim/LazyVim/commit/f9fdb356f2362e5ae4ef490944b1957b49dc6680))
|
||||
|
||||
## [12.32.0](https://github.com/LazyVim/LazyVim/compare/v12.31.0...v12.32.0) (2024-07-18)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **edgy:** added support for grug-far.nvim ([b1a4740](https://github.com/LazyVim/LazyVim/commit/b1a47405b9fa5eb9f5222876e81be73206b80792))
|
||||
* **terminal:** clear search highlight when opening a terminal ([#4090](https://github.com/LazyVim/LazyVim/issues/4090)) ([b5290fd](https://github.com/LazyVim/LazyVim/commit/b5290fd92935d2e96fa2249cfd09bdd853972869))
|
||||
* **toggle:** move toggle notifs to toggle function ([c1b76ee](https://github.com/LazyVim/LazyVim/commit/c1b76ee235a2cccff6370ecfca57bdacd5fe6258))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **autcmds:** desc for close_with_q ([d6561fd](https://github.com/LazyVim/LazyVim/commit/d6561fd27c17806ca972cbfc18573ca81d13e346))
|
||||
* **ui:** another typo ([b8bdebe](https://github.com/LazyVim/LazyVim/commit/b8bdebe5be7eba91db23e43575fc1226075f6a56))
|
||||
* **ui:** typo ([4ac249b](https://github.com/LazyVim/LazyVim/commit/4ac249beaae3462d606128ca21db79cb85a8c65b))
|
||||
|
||||
## [12.31.0](https://github.com/LazyVim/LazyVim/compare/v12.30.0...v12.31.0) (2024-07-17)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **keymaps:** proxy leader-w to ctrl-w ([bab5440](https://github.com/LazyVim/LazyVim/commit/bab54406dc312947e4e03bb728498503c09231ca))
|
||||
* **R:** added new which-key group for new install feature ([#4078](https://github.com/LazyVim/LazyVim/issues/4078)) ([5339aca](https://github.com/LazyVim/LazyVim/commit/5339acacec0996968d64fdbaf9fe8187bfea1b47))
|
||||
* **toggle:** make toggles callable. Fixes [#4081](https://github.com/LazyVim/LazyVim/issues/4081) ([150523b](https://github.com/LazyVim/LazyVim/commit/150523b77b6e848c4135a97a5fd8f6f79a6f4443))
|
||||
* **treesitter-context:** which-key toggle ([#4059](https://github.com/LazyVim/LazyVim/issues/4059)) ([ab01350](https://github.com/LazyVim/LazyVim/commit/ab0135093bc18ccf82325bc8ee14c25230a71786))
|
||||
* **which-key:** dynamic buffer mappings under leader-b ([8d9f2ad](https://github.com/LazyVim/LazyVim/commit/8d9f2ad97ee0d495135380975438ab8a8ae62b14))
|
||||
* **which-key:** dynamic window mappings under leader-w ([66bba78](https://github.com/LazyVim/LazyVim/commit/66bba787b83afdd85b5ee95aa589fbe9fbb95535))
|
||||
* **which-key:** leader-w-space starts hydra mode for window mappings ([865bf15](https://github.com/LazyVim/LazyVim/commit/865bf15f1cf4d4f6a3eda6d7509f94a59752fb36))
|
||||
|
||||
## [12.30.0](https://github.com/LazyVim/LazyVim/compare/v12.29.2...v12.30.0) (2024-07-15)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **keymaps:** dynamic which-key icons/descriptions for toggles ([#4050](https://github.com/LazyVim/LazyVim/issues/4050)) ([78cf032](https://github.com/LazyVim/LazyVim/commit/78cf0320bfc34050883cde5e7af267184dc60ee9))
|
||||
* **util.mini:** follow the user's mappings instead of hardcoded values ([#4043](https://github.com/LazyVim/LazyVim/issues/4043)) ([8506cb5](https://github.com/LazyVim/LazyVim/commit/8506cb5a98a528651a5557d8e447fa13bd8ac0cb))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **lsp:** lsp keymaps. Fixes [#4051](https://github.com/LazyVim/LazyVim/issues/4051) ([706ec4b](https://github.com/LazyVim/LazyVim/commit/706ec4b6b6be4265cbcfd326d3216f2a29952b55))
|
||||
* **yanky:** enable yank history in visual mode ([#4048](https://github.com/LazyVim/LazyVim/issues/4048)) ([6911327](https://github.com/LazyVim/LazyVim/commit/6911327a5edca85ce3bc71229236494d9af7fafa))
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* **luasnip:** luasnip wasn't lazyloaded ([#4032](https://github.com/LazyVim/LazyVim/issues/4032)) ([e80ed32](https://github.com/LazyVim/LazyVim/commit/e80ed322a79a8b9857c6ab0ad76545654917ddcb))
|
||||
|
||||
## [12.29.2](https://github.com/LazyVim/LazyVim/compare/v12.29.1...v12.29.2) (2024-07-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **telescope:** better find_command. Fixes [#4031](https://github.com/LazyVim/LazyVim/issues/4031) ([d39cdb0](https://github.com/LazyVim/LazyVim/commit/d39cdb059624b1200f2ef762f30c6e3b74066bc5))
|
||||
|
||||
## [12.29.1](https://github.com/LazyVim/LazyVim/compare/v12.29.0...v12.29.1) (2024-07-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **omnisharp:** don't detach coreclr debug adapter ([#4023](https://github.com/LazyVim/LazyVim/issues/4023)) ([b3e746b](https://github.com/LazyVim/LazyVim/commit/b3e746b637a0d43aa0195cc1ff3d8adf1fedfaf6))
|
||||
* **pick:** get rid of "auto" picker and set better defaults for telescope find_files ([#4024](https://github.com/LazyVim/LazyVim/issues/4024)) ([337e9dd](https://github.com/LazyVim/LazyVim/commit/337e9ddc007d32c624433b5c6f0af6e8697dfcc6))
|
||||
* **tailwind:** additional tailwind completion settings for phoenix projects ([#3961](https://github.com/LazyVim/LazyVim/issues/3961)) ([9bce054](https://github.com/LazyVim/LazyVim/commit/9bce054fafcd631ec133a82ada1ecbbd23ca5510))
|
||||
|
||||
## [12.29.0](https://github.com/LazyVim/LazyVim/compare/v12.28.0...v12.29.0) (2024-07-14)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **java:** new java mappings format for which-key v3 ([#4013](https://github.com/LazyVim/LazyVim/issues/4013)) ([28a7f81](https://github.com/LazyVim/LazyVim/commit/28a7f8126c1b46b41ca58845ee081b67ce6981f2))
|
||||
* shorter keymap descriptions for mini.ai / yanky ([75ff149](https://github.com/LazyVim/LazyVim/commit/75ff1496bd4209784a4250e59920d24d75a3e3b0))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **flit:** use which-key preset keymap descriptions ([#4000](https://github.com/LazyVim/LazyVim/issues/4000)) ([ca37162](https://github.com/LazyVim/LazyVim/commit/ca37162cb7452dce32cf3f0ad661bcd1245286c0))
|
||||
|
||||
## [12.28.0](https://github.com/LazyVim/LazyVim/compare/v12.27.0...v12.28.0) (2024-07-12)
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*LazyVim.txt* For Neovim Last change: 2024 July 19
|
||||
*LazyVim.txt* For Neovim Last change: 2024 July 13
|
||||
|
||||
==============================================================================
|
||||
Table of Contents *LazyVim-table-of-contents*
|
||||
|
@ -71,11 +71,7 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||
},
|
||||
callback = function(event)
|
||||
vim.bo[event.buf].buflisted = false
|
||||
vim.keymap.set("n", "q", "<cmd>close<cr>", {
|
||||
buffer = event.buf,
|
||||
silent = true,
|
||||
desc = "Quit buffer",
|
||||
})
|
||||
vim.keymap.set("n", "q", "<cmd>close<cr>", { buffer = event.buf, silent = true })
|
||||
end,
|
||||
})
|
||||
|
||||
|
@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util")
|
||||
---@class LazyVimConfig: LazyVimOptions
|
||||
local M = {}
|
||||
|
||||
M.version = "12.33.0" -- x-release-please-version
|
||||
M.version = "12.28.0" -- x-release-please-version
|
||||
LazyVim.config = M
|
||||
|
||||
---@class LazyVimOptions
|
||||
|
@ -115,19 +115,20 @@ map("n", "[w", diagnostic_goto(false, "WARN"), { desc = "Prev Warning" })
|
||||
-- stylua: ignore start
|
||||
|
||||
-- toggle options
|
||||
LazyVim.toggle.map("<leader>uf", LazyVim.toggle.format())
|
||||
LazyVim.toggle.map("<leader>uF", LazyVim.toggle.format(true))
|
||||
LazyVim.toggle.map("<leader>us", LazyVim.toggle("spell", { name = "Spelling" }))
|
||||
LazyVim.toggle.map("<leader>uw", LazyVim.toggle("wrap", { name = "Wrap" }))
|
||||
LazyVim.toggle.map("<leader>uL", LazyVim.toggle("relativenumber", { name = "Relative Number" }))
|
||||
LazyVim.toggle.map("<leader>ud", LazyVim.toggle.diagnostics)
|
||||
LazyVim.toggle.map("<leader>ul", LazyVim.toggle.number)
|
||||
LazyVim.toggle.map( "<leader>uc", LazyVim.toggle("conceallevel", { values = { 0, vim.o.conceallevel > 0 and vim.o.conceallevel or 2 } }))
|
||||
LazyVim.toggle.map("<leader>uT", LazyVim.toggle.treesitter)
|
||||
LazyVim.toggle.map("<leader>ub", LazyVim.toggle("background", { values = { "light", "dark" }, name = "Background" }))
|
||||
if vim.lsp.inlay_hint then
|
||||
LazyVim.toggle.map("<leader>uh", LazyVim.toggle.inlay_hints)
|
||||
map("n", "<leader>uf", function() LazyVim.format.toggle() end, { desc = "Toggle Auto Format (Global)" })
|
||||
map("n", "<leader>uF", function() LazyVim.format.toggle(true) end, { desc = "Toggle Auto Format (Buffer)" })
|
||||
map("n", "<leader>us", function() LazyVim.toggle("spell") end, { desc = "Toggle Spelling" })
|
||||
map("n", "<leader>uw", function() LazyVim.toggle("wrap") end, { desc = "Toggle Word Wrap" })
|
||||
map("n", "<leader>uL", function() LazyVim.toggle("relativenumber") end, { desc = "Toggle Relative Line Numbers" })
|
||||
map("n", "<leader>ul", function() LazyVim.toggle.number() end, { desc = "Toggle Line Numbers" })
|
||||
map("n", "<leader>ud", function() LazyVim.toggle.diagnostics() end, { desc = "Toggle Diagnostics" })
|
||||
local conceallevel = vim.o.conceallevel > 0 and vim.o.conceallevel or 3
|
||||
map("n", "<leader>uc", function() LazyVim.toggle("conceallevel", false, {0, conceallevel}) end, { desc = "Toggle Conceal" })
|
||||
if vim.lsp.buf.inlay_hint or vim.lsp.inlay_hint then
|
||||
map( "n", "<leader>uh", function() LazyVim.toggle.inlay_hints() end, { desc = "Toggle Inlay Hints" })
|
||||
end
|
||||
map("n", "<leader>uT", function() if vim.b.ts_highlight then vim.treesitter.stop() else vim.treesitter.start() end end, { desc = "Toggle Treesitter Highlight" })
|
||||
map("n", "<leader>ub", function() LazyVim.toggle("background", false, {"light", "dark"}) end, { desc = "Toggle Background" })
|
||||
|
||||
-- lazygit
|
||||
map("n", "<leader>gg", function() LazyVim.lazygit( { cwd = LazyVim.root.git() }) end, { desc = "Lazygit (Root Dir)" })
|
||||
@ -174,11 +175,13 @@ map("t", "<C-/>", "<cmd>close<cr>", { desc = "Hide Terminal" })
|
||||
map("t", "<c-_>", "<cmd>close<cr>", { desc = "which_key_ignore" })
|
||||
|
||||
-- windows
|
||||
map("n", "<leader>w", "<c-w>", { desc = "Windows", remap = true })
|
||||
map("n", "<leader>ww", "<C-W>p", { desc = "Other Window", remap = true })
|
||||
map("n", "<leader>wd", "<C-W>c", { desc = "Delete Window", remap = true })
|
||||
map("n", "<leader>w-", "<C-W>s", { desc = "Split Window Below", remap = true })
|
||||
map("n", "<leader>w|", "<C-W>v", { desc = "Split Window Right", remap = true })
|
||||
map("n", "<leader>-", "<C-W>s", { desc = "Split Window Below", remap = true })
|
||||
map("n", "<leader>|", "<C-W>v", { desc = "Split Window Right", remap = true })
|
||||
map("n", "<c-w>d", "<C-W>c", { desc = "Delete Window", remap = true })
|
||||
LazyVim.toggle.map("<c-w>m", LazyVim.toggle.maximize)
|
||||
map("n", "<leader>wm", function() LazyVim.toggle.maximize() end, { desc = "Maximize Toggle" })
|
||||
|
||||
-- tabs
|
||||
map("n", "<leader><tab>l", "<cmd>tablast<cr>", { desc = "Last Tab" })
|
||||
|
@ -47,7 +47,6 @@ vim.g.deprecation_warnings = false
|
||||
vim.g.bigfile_size = 1024 * 1024 * 1.5 -- 1.5 MB
|
||||
|
||||
-- Show the current document symbols location from Trouble in lualine
|
||||
-- You can disable this for a buffer by setting `vim.b.trouble_lualine = false`
|
||||
vim.g.trouble_lualine = true
|
||||
|
||||
local opt = vim.opt
|
||||
|
@ -140,6 +140,20 @@ return {
|
||||
-- better deal with markdown code blocks
|
||||
markdown = true,
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>up",
|
||||
function()
|
||||
vim.g.minipairs_disable = not vim.g.minipairs_disable
|
||||
if vim.g.minipairs_disable then
|
||||
LazyVim.warn("Disabled auto pairs", { title = "Option" })
|
||||
else
|
||||
LazyVim.info("Enabled auto pairs", { title = "Option" })
|
||||
end
|
||||
end,
|
||||
desc = "Toggle Auto Pairs",
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
LazyVim.mini.pairs(opts)
|
||||
end,
|
||||
@ -157,6 +171,9 @@ return {
|
||||
"echasnovski/mini.ai",
|
||||
event = "VeryLazy",
|
||||
opts = function()
|
||||
LazyVim.on_load("which-key.nvim", function()
|
||||
vim.schedule(LazyVim.mini.ai_whichkey)
|
||||
end)
|
||||
local ai = require("mini.ai")
|
||||
return {
|
||||
n_lines = 500,
|
||||
@ -180,14 +197,6 @@ return {
|
||||
},
|
||||
}
|
||||
end,
|
||||
config = function(_, opts)
|
||||
require("mini.ai").setup(opts)
|
||||
LazyVim.on_load("which-key.nvim", function()
|
||||
vim.schedule(function()
|
||||
LazyVim.mini.ai_whichkey(opts)
|
||||
end)
|
||||
end)
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -169,29 +169,16 @@ return {
|
||||
{
|
||||
mode = { "n", "v" },
|
||||
{ "<leader><tab>", group = "tabs" },
|
||||
{
|
||||
"<leader>b",
|
||||
group = "buffer",
|
||||
expand = function()
|
||||
return require("which-key.extras").expand.buf()
|
||||
end,
|
||||
},
|
||||
{ "<leader>b", group = "buffer" },
|
||||
{ "<leader>c", group = "code" },
|
||||
{ "<leader>f", group = "file/find" },
|
||||
{ "<leader>g", group = "git" },
|
||||
{ "<leader>gh", group = "hunks" },
|
||||
{ "<leader>q", group = "quit/session" },
|
||||
{ "<leader>s", group = "search" },
|
||||
{ "<leader>u", group = "ui", icon = { icon = " ", color = "cyan" } },
|
||||
{
|
||||
"<leader>w",
|
||||
group = "windows",
|
||||
proxy = "<c-w>",
|
||||
expand = function()
|
||||
return require("which-key.extras").expand.win()
|
||||
end,
|
||||
},
|
||||
{ "<leader>x", group = "diagnostics/quickfix", icon = { icon = " ", color = "green" } },
|
||||
{ "<leader>u", group = "ui" },
|
||||
{ "<leader>w", group = "windows" },
|
||||
{ "<leader>x", group = "diagnostics/quickfix" },
|
||||
{ "[", group = "prev" },
|
||||
{ "]", group = "next" },
|
||||
{ "g", group = "goto" },
|
||||
@ -206,14 +193,7 @@ return {
|
||||
function()
|
||||
require("which-key").show({ global = false })
|
||||
end,
|
||||
desc = "Buffer Keymaps (which-key)",
|
||||
},
|
||||
{
|
||||
"<c-w><space>",
|
||||
function()
|
||||
require("which-key").show({ keys = "<c-w>", loop = true })
|
||||
end,
|
||||
desc = "Window Hydra Mode (which-key)",
|
||||
desc = "Buffer Local Keymaps (which-key)",
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
|
@ -1,7 +1,6 @@
|
||||
return {
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
lazy = true,
|
||||
build = (not LazyVim.is_win())
|
||||
and "echo 'NOTE: jsregexp is optional, so not a big deal if it fails to build'; make install_jsregexp"
|
||||
or nil,
|
||||
|
@ -17,15 +17,14 @@ return {
|
||||
vim.cmd([[YankyRingHistory]])
|
||||
end
|
||||
end,
|
||||
mode = { "n", "x" },
|
||||
desc = "Open Yank History",
|
||||
},
|
||||
-- stylua: ignore
|
||||
{ "y", "<Plug>(YankyYank)", mode = { "n", "x" }, desc = "Yank Text" },
|
||||
{ "p", "<Plug>(YankyPutAfter)", mode = { "n", "x" }, desc = "Put Text After Cursor" },
|
||||
{ "P", "<Plug>(YankyPutBefore)", mode = { "n", "x" }, desc = "Put Text Before Cursor" },
|
||||
{ "gp", "<Plug>(YankyGPutAfter)", mode = { "n", "x" }, desc = "Put Text After Selection" },
|
||||
{ "gP", "<Plug>(YankyGPutBefore)", mode = { "n", "x" }, desc = "Put Text Before Selection" },
|
||||
{ "p", "<Plug>(YankyPutAfter)", mode = { "n", "x" }, desc = "Put Yanked Text After Cursor" },
|
||||
{ "P", "<Plug>(YankyPutBefore)", mode = { "n", "x" }, desc = "Put Yanked Text Before Cursor" },
|
||||
{ "gp", "<Plug>(YankyGPutAfter)", mode = { "n", "x" }, desc = "Put Yanked Text After Selection" },
|
||||
{ "gP", "<Plug>(YankyGPutBefore)", mode = { "n", "x" }, desc = "Put Yanked Text Before Selection" },
|
||||
{ "[y", "<Plug>(YankyCycleForward)", desc = "Cycle Forward Through Yank History" },
|
||||
{ "]y", "<Plug>(YankyCycleBackward)", desc = "Cycle Backward Through Yank History" },
|
||||
{ "]p", "<Plug>(YankyPutIndentAfterLinewise)", desc = "Put Indented After Cursor (Linewise)" },
|
||||
|
@ -165,20 +165,6 @@ return {
|
||||
LazyVim.pick("find_files", { hidden = true, default_text = line })()
|
||||
end
|
||||
|
||||
local function find_command()
|
||||
if 1 == vim.fn.executable("rg") then
|
||||
return { "rg", "--files", "--color", "never", "-g", "!.git" }
|
||||
elseif 1 == vim.fn.executable("fd") then
|
||||
return { "fd", "--type", "f", "--color", "never", "-E", ".git" }
|
||||
elseif 1 == vim.fn.executable("fdfind") then
|
||||
return { "fdfind", "--type", "f", "--color", "never", "-E", ".git" }
|
||||
elseif 1 == vim.fn.executable("find") and vim.fn.has("win32") == 0 then
|
||||
return { "find", ".", "-type", "f" }
|
||||
elseif 1 == vim.fn.executable("where") then
|
||||
return { "where", "/r", ".", "*" }
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
defaults = {
|
||||
prompt_prefix = " ",
|
||||
@ -214,7 +200,7 @@ return {
|
||||
},
|
||||
pickers = {
|
||||
find_files = {
|
||||
find_command = find_command,
|
||||
find_command = { "fd", "--type", "f", "--color", "never", "-E", ".git" },
|
||||
hidden = true,
|
||||
},
|
||||
},
|
||||
|
@ -1,125 +0,0 @@
|
||||
return {
|
||||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
ft = { "lean" },
|
||||
root = { "lean-toolchain" },
|
||||
})
|
||||
end,
|
||||
"Julian/lean.nvim",
|
||||
event = { "BufReadPre *.lean", "BufNewFile *.lean" },
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
|
||||
-- see details below for full configuration options
|
||||
opts = {
|
||||
-- Enable the Lean language server(s)?
|
||||
--
|
||||
-- false to disable, otherwise should be a table of options to pass to `leanls`
|
||||
--
|
||||
-- See https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#leanls for details.
|
||||
-- In particular ensure you have followed instructions setting up a callback
|
||||
-- for `LspAttach` which sets your key bindings!
|
||||
lsp = {
|
||||
init_options = {
|
||||
-- See Lean.Lsp.InitializationOptions for details and further options.
|
||||
|
||||
-- Time (in milliseconds) which must pass since latest edit until elaboration begins.
|
||||
-- Lower values may make editing feel faster at the cost of higher CPU usage.
|
||||
-- Note that lean.nvim changes the Lean default for this value!
|
||||
editDelay = 0,
|
||||
|
||||
-- Whether to signal that widgets are supported.
|
||||
hasWidgets = true,
|
||||
},
|
||||
},
|
||||
|
||||
ft = {
|
||||
-- A list of patterns which will be used to protect any matching
|
||||
-- Lean file paths from being accidentally modified (by marking the
|
||||
-- buffer as `nomodifiable`).
|
||||
nomodifiable = {
|
||||
-- by default, this list includes the Lean standard libraries,
|
||||
-- as well as files within dependency directories (e.g. `_target`)
|
||||
-- Set this to an empty table to disable.
|
||||
},
|
||||
},
|
||||
|
||||
-- Abbreviation support
|
||||
abbreviations = {
|
||||
-- Enable expanding of unicode abbreviations?
|
||||
enable = true,
|
||||
-- additional abbreviations:
|
||||
extra = {
|
||||
-- Add a \wknight abbreviation to insert ♘
|
||||
--
|
||||
-- Note that the backslash is implied, and that you of
|
||||
-- course may also use a snippet engine directly to do
|
||||
-- this if so desired.
|
||||
wknight = "♘",
|
||||
},
|
||||
-- Change if you don't like the backslash
|
||||
-- (comma is a popular choice on French keyboards)
|
||||
leader = "\\",
|
||||
},
|
||||
|
||||
-- Enable suggested mappings?
|
||||
--
|
||||
-- false by default, true to enable
|
||||
mappings = true,
|
||||
|
||||
-- Infoview support
|
||||
infoview = {
|
||||
-- Automatically open an infoview on entering a Lean buffer?
|
||||
-- Should be a function that will be called anytime a new Lean file
|
||||
-- is opened. Return true to open an infoview, otherwise false.
|
||||
-- Setting this to `true` is the same as `function() return true end`,
|
||||
-- i.e. autoopen for any Lean file, or setting it to `false` is the
|
||||
-- same as `function() return false end`, i.e. never autoopen.
|
||||
autoopen = true,
|
||||
|
||||
-- Set infoview windows' starting dimensions.
|
||||
-- Windows are opened horizontally or vertically depending on spacing.
|
||||
width = 50,
|
||||
height = 20,
|
||||
|
||||
-- Put the infoview on the top or bottom when horizontal?
|
||||
-- top | bottom
|
||||
horizontal_position = "bottom",
|
||||
|
||||
-- Always open the infoview window in a separate tabpage.
|
||||
-- Might be useful if you are using a screen reader and don't want too
|
||||
-- many dynamic updates in the terminal at the same time.
|
||||
-- Note that `height` and `width` will be ignored in this case.
|
||||
separate_tab = false,
|
||||
|
||||
-- Show indicators for pin locations when entering an infoview window?
|
||||
-- always | never | auto (= only when there are multiple pins)
|
||||
indicators = "auto",
|
||||
},
|
||||
|
||||
-- Progress bar support
|
||||
progress_bars = {
|
||||
-- Enable the progress bars?
|
||||
enable = true,
|
||||
-- What character should be used for the bars?
|
||||
character = "│",
|
||||
-- Use a different priority for the signs
|
||||
priority = 10,
|
||||
},
|
||||
|
||||
-- Redirect Lean's stderr messages somehwere (to a buffer by default)
|
||||
stderr = {
|
||||
enable = true,
|
||||
-- height of the window
|
||||
height = 5,
|
||||
-- a callback which will be called with (multi-line) stderr output
|
||||
-- e.g., use:
|
||||
-- on_lines = function(lines) vim.notify(lines) end
|
||||
-- if you want to redirect stderr to `vim.notify`.
|
||||
-- The default implementation will redirect to a dedicated stderr
|
||||
-- window.
|
||||
on_lines = nil,
|
||||
},
|
||||
},
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
return {
|
||||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
ft = { "ml", "mli", "cmi", "cmo", "cmx", "cma", "cmxa", "cmxs", "cmt", "cmti", "opam" },
|
||||
root = { "merlin.opam", "dune-project" },
|
||||
})
|
||||
end,
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
if type(opts.ensure_installed) == "table" then
|
||||
vim.list_extend(opts.ensure_installed, { "ocaml" })
|
||||
end
|
||||
end,
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
ocamllsp = {
|
||||
get_language_id = function(_, ftype)
|
||||
return language_id_of[ftype]
|
||||
end,
|
||||
root_dir = function(fname)
|
||||
return require("lspconfig.util").root_pattern(
|
||||
"*.opam",
|
||||
"esy.json",
|
||||
"package.json",
|
||||
".git",
|
||||
"dune-project",
|
||||
"dune-workspace",
|
||||
"*.ml"
|
||||
)(fname)
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
@ -75,9 +75,6 @@ return {
|
||||
type = "executable",
|
||||
command = vim.fn.exepath("netcoredbg"),
|
||||
args = { "--interpreter=vscode" },
|
||||
options = {
|
||||
detached = false,
|
||||
},
|
||||
}
|
||||
end
|
||||
for _, lang in ipairs({ "cs", "fsharp", "vb" }) do
|
||||
|
@ -19,15 +19,14 @@ return {
|
||||
vim.keymap.set("n", "<Enter>", "<Plug>RDSendLine", { buffer = true })
|
||||
vim.keymap.set("v", "<Enter>", "<Plug>RSendSelection", { buffer = true })
|
||||
|
||||
-- Increase the width of which-key to handle the longer r-nvim descriptions
|
||||
local wk = require("which-key")
|
||||
wk.add({
|
||||
buffer = true,
|
||||
{ "<localleader>a", group = "all" },
|
||||
{ "<localleader>b", group = "between marks" },
|
||||
{ "<localleader>c", group = "chunks" },
|
||||
{ "<localleader>f", group = "functions" },
|
||||
{ "<localleader>g", group = "goto" },
|
||||
{ "<localleader>i", group = "install" },
|
||||
{ "<localleader>k", group = "knit" },
|
||||
{ "<localleader>p", group = "paragraph" },
|
||||
{ "<localleader>q", group = "quarto" },
|
||||
|
@ -1,17 +1,3 @@
|
||||
if lazyvim_docs then
|
||||
-- LSP Server to use for Ruby.
|
||||
-- Set to "solargraph" to use solargraph instead of ruby_lsp.
|
||||
vim.g.lazyvim_ruby_lsp = "ruby_lsp"
|
||||
vim.g.lazyvim_ruby_formatter = "rubocop"
|
||||
end
|
||||
|
||||
local lsp = vim.g.lazyvim_ruby_lsp or "ruby_lsp"
|
||||
if vim.fn.has("nvim-0.10") == 0 then
|
||||
-- ruby_lsp does not work well with Neovim < 0.10
|
||||
lsp = vim.g.lazyvim_ruby_lsp or "solargraph"
|
||||
end
|
||||
local formatter = vim.g.lazyvim_ruby_formatter or "rubocop"
|
||||
|
||||
return {
|
||||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
@ -25,29 +11,12 @@ return {
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
ruby_lsp = {
|
||||
enabled = lsp == "ruby_lsp",
|
||||
},
|
||||
solargraph = {
|
||||
enabled = lsp == "solargraph",
|
||||
},
|
||||
rubocop = {
|
||||
enabled = formatter == "rubocop",
|
||||
},
|
||||
standardrb = {
|
||||
enabled = formatter == "standardrb",
|
||||
},
|
||||
solargraph = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = { ensure_installed = { "erb-formatter", "erb-lint" } },
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
optional = true,
|
||||
@ -58,16 +27,6 @@ return {
|
||||
end,
|
||||
},
|
||||
},
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
optional = true,
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
ruby = { formatter },
|
||||
eruby = { "erb-format" },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvim-neotest/neotest",
|
||||
optional = true,
|
||||
|
@ -40,17 +40,6 @@ return {
|
||||
return not vim.tbl_contains(opts.filetypes_exclude or {}, ft)
|
||||
end, opts.filetypes)
|
||||
|
||||
-- Additional settings for Phoenix projects
|
||||
opts.settings = {
|
||||
tailwindCSS = {
|
||||
includeLanguages = {
|
||||
elixir = "html-eex",
|
||||
eelixir = "html-eex",
|
||||
heex = "html-eex",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Add additional filetypes
|
||||
vim.list_extend(opts.filetypes, opts.filetypes_include or {})
|
||||
end,
|
||||
|
@ -56,9 +56,6 @@ return {
|
||||
{ title = "Neotest Summary", ft = "neotest-summary" },
|
||||
-- "neo-tree",
|
||||
},
|
||||
right = {
|
||||
{ title = "Grug Far", ft = "grug-far", size = { width = 0.4 } },
|
||||
},
|
||||
keys = {
|
||||
-- increase width
|
||||
["<c-Right>"] = function(win)
|
||||
|
@ -14,16 +14,6 @@ return {
|
||||
end, { expr = true })
|
||||
end
|
||||
|
||||
LazyVim.toggle.map("<leader>ua", {
|
||||
name = "Mini Animate",
|
||||
get = function()
|
||||
return not vim.g.minianimate_disable
|
||||
end,
|
||||
set = function(state)
|
||||
vim.g.minianimate_disable = not state
|
||||
end,
|
||||
})
|
||||
|
||||
local animate = require("mini.animate")
|
||||
return {
|
||||
resize = {
|
||||
|
@ -1,22 +1,21 @@
|
||||
-- Show context of the current function
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter-context",
|
||||
event = "VeryLazy",
|
||||
opts = function()
|
||||
local tsc = require("treesitter-context")
|
||||
|
||||
LazyVim.toggle.map("<leader>ut", {
|
||||
name = "Treesitter Context",
|
||||
get = tsc.enabled,
|
||||
set = function(state)
|
||||
if state then
|
||||
tsc.enable()
|
||||
event = "LazyFile",
|
||||
opts = { mode = "cursor", max_lines = 3 },
|
||||
keys = {
|
||||
{
|
||||
"<leader>ut",
|
||||
function()
|
||||
local tsc = require("treesitter-context")
|
||||
tsc.toggle()
|
||||
if LazyVim.inject.get_upvalue(tsc.toggle, "enabled") then
|
||||
LazyVim.info("Enabled Treesitter Context", { title = "Option" })
|
||||
else
|
||||
tsc.disable()
|
||||
LazyVim.warn("Disabled Treesitter Context", { title = "Option" })
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
return { mode = "cursor", max_lines = 3 }
|
||||
end,
|
||||
desc = "Toggle Treesitter Context",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -7,9 +7,9 @@ return {
|
||||
"mason.nvim",
|
||||
{ "williamboman/mason-lspconfig.nvim", config = function() end },
|
||||
},
|
||||
---@class PluginLspOpts
|
||||
opts = function()
|
||||
---@class PluginLspOpts
|
||||
local ret = {
|
||||
return {
|
||||
-- options for vim.diagnostic.config()
|
||||
---@type vim.diagnostic.Opts
|
||||
diagnostics = {
|
||||
@ -114,7 +114,6 @@ return {
|
||||
-- ["*"] = function(server, opts) end,
|
||||
},
|
||||
}
|
||||
return ret
|
||||
end,
|
||||
---@param opts PluginLspOpts
|
||||
config = function(_, opts)
|
||||
@ -151,7 +150,7 @@ return {
|
||||
and vim.bo[buffer].buftype == ""
|
||||
and not vim.tbl_contains(opts.inlay_hints.exclude, vim.bo[buffer].filetype)
|
||||
then
|
||||
vim.lsp.inlay_hint.enable(true, { bufnr = buffer })
|
||||
LazyVim.toggle.inlay_hints(buffer, true)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
@ -14,10 +14,10 @@ function M.get()
|
||||
-- stylua: ignore
|
||||
M._keys = {
|
||||
{ "<leader>cl", "<cmd>LspInfo<cr>", desc = "Lsp Info" },
|
||||
{ "gd", vim.lsp.buf.definition, desc = "Goto Definition", has = "definition" },
|
||||
{ "gr", vim.lsp.buf.references, desc = "References", nowait = true },
|
||||
{ "gI", vim.lsp.buf.implementation, desc = "Goto Implementation" },
|
||||
{ "gy", vim.lsp.buf.type_definition, desc = "Goto T[y]pe Definition" },
|
||||
{ "gd", vim.lsp.buf.definition(), desc = "Goto Definition", has = "definition" },
|
||||
{ "gr", vim.lsp.buf.references(), desc = "References", nowait = true },
|
||||
{ "gI", vim.lsp.buf.implementation(), desc = "Goto Implementation" },
|
||||
{ "gy", vim.lsp.buf.type_definition(), desc = "Goto T[y]pe Definition" },
|
||||
{ "gD", vim.lsp.buf.declaration, desc = "Goto Declaration" },
|
||||
{ "K", vim.lsp.buf.hover, desc = "Hover" },
|
||||
{ "gK", vim.lsp.buf.signature_help, desc = "Signature Help", has = "signatureHelp" },
|
||||
|
@ -1,14 +1,4 @@
|
||||
return {
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = {
|
||||
spec = {
|
||||
{ "<BS>", desc = "Decrement Selection", mode = "x" },
|
||||
{ "<c-space>", desc = "Increment Selection", mode = { "x", "n" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Treesitter is a new parser generator tool that we can
|
||||
-- use in Neovim to power faster and more accurate
|
||||
-- syntax highlighting.
|
||||
|
@ -198,22 +198,20 @@ return {
|
||||
}
|
||||
|
||||
-- do not add trouble symbols if aerial is enabled
|
||||
-- And allow it to be overriden for some buffer types (see autocmds)
|
||||
if vim.g.trouble_lualine and LazyVim.has("trouble.nvim") then
|
||||
local trouble = require("trouble")
|
||||
local symbols = trouble.statusline({
|
||||
mode = "symbols",
|
||||
groups = {},
|
||||
title = false,
|
||||
filter = { range = true },
|
||||
format = "{kind_icon}{symbol.name:Normal}",
|
||||
hl_group = "lualine_c_normal",
|
||||
})
|
||||
local symbols = trouble.statusline
|
||||
and trouble.statusline({
|
||||
mode = "symbols",
|
||||
groups = {},
|
||||
title = false,
|
||||
filter = { range = true },
|
||||
format = "{kind_icon}{symbol.name:Normal}",
|
||||
hl_group = "lualine_c_normal",
|
||||
})
|
||||
table.insert(opts.sections.lualine_c, {
|
||||
symbols and symbols.get,
|
||||
cond = function()
|
||||
return vim.b.trouble_lualine ~= false and symbols.has()
|
||||
end,
|
||||
cond = symbols and symbols.has,
|
||||
})
|
||||
end
|
||||
|
||||
|
@ -6,7 +6,7 @@ return {
|
||||
{
|
||||
"folke/persistence.nvim",
|
||||
event = "BufReadPre",
|
||||
opts = {},
|
||||
opts = { options = vim.opt.sessionoptions:get() },
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>qs", function() require("persistence").load() end, desc = "Restore Session" },
|
||||
|
@ -97,19 +97,10 @@ end
|
||||
|
||||
---@param buf? boolean
|
||||
function M.toggle(buf)
|
||||
M.enable(not M.enabled(), buf)
|
||||
end
|
||||
|
||||
---@param enable? boolean
|
||||
---@param buf? boolean
|
||||
function M.enable(enable, buf)
|
||||
if enable == nil then
|
||||
enable = true
|
||||
end
|
||||
if buf then
|
||||
vim.b.autoformat = enable
|
||||
vim.b.autoformat = not M.enabled()
|
||||
else
|
||||
vim.g.autoformat = enable
|
||||
vim.g.autoformat = not M.enabled()
|
||||
vim.b.autoformat = nil
|
||||
end
|
||||
M.info()
|
||||
|
@ -60,59 +60,48 @@ function M.ai_buffer(ai_type)
|
||||
end
|
||||
|
||||
-- register all text objects with which-key
|
||||
---@param opts table
|
||||
function M.ai_whichkey(opts)
|
||||
function M.ai_whichkey()
|
||||
local objects = {
|
||||
{ " ", desc = "whitespace" },
|
||||
{ '"', desc = '" string' },
|
||||
{ "'", desc = "' string" },
|
||||
{ "(", desc = "() block" },
|
||||
{ ")", desc = "() block with ws" },
|
||||
{ "<", desc = "<> block" },
|
||||
{ ">", desc = "<> block with ws" },
|
||||
{ '"', desc = 'balanced "' },
|
||||
{ "'", desc = "balanced '" },
|
||||
{ "(", desc = "balanced (" },
|
||||
{ ")", desc = "balanced ) including white-space" },
|
||||
{ "<", desc = "balanced <" },
|
||||
{ ">", desc = "balanced > including white-space" },
|
||||
{ "?", desc = "user prompt" },
|
||||
{ "U", desc = "use/call without dot" },
|
||||
{ "[", desc = "[] block" },
|
||||
{ "]", desc = "[] block with ws" },
|
||||
{ "U", desc = "use/call without dot in name" },
|
||||
{ "[", desc = "balanced [" },
|
||||
{ "]", desc = "balanced ] including white-space" },
|
||||
{ "_", desc = "underscore" },
|
||||
{ "`", desc = "` string" },
|
||||
{ "`", desc = "balanced `" },
|
||||
{ "a", desc = "argument" },
|
||||
{ "b", desc = ")]} block" },
|
||||
{ "b", desc = "balanced )]}" },
|
||||
{ "c", desc = "class" },
|
||||
{ "d", desc = "digit(s)" },
|
||||
{ "e", desc = "CamelCase / snake_case" },
|
||||
{ "e", desc = "word in CamelCase & snake_case" },
|
||||
{ "f", desc = "function" },
|
||||
{ "g", desc = "entire file" },
|
||||
{ "i", desc = "indent" },
|
||||
{ "o", desc = "block, conditional, loop" },
|
||||
{ "q", desc = "quote `\"'" },
|
||||
{ "t", desc = "tag" },
|
||||
{ "u", desc = "use/call" },
|
||||
{ "{", desc = "{} block" },
|
||||
{ "}", desc = "{} with ws" },
|
||||
{ "u", desc = "use/call function & method" },
|
||||
{ "{", desc = "balanced {" },
|
||||
{ "}", desc = "balanced } including white-space" },
|
||||
}
|
||||
|
||||
local ret = { mode = { "o", "x" } }
|
||||
---@type table<string, string>
|
||||
local mappings = vim.tbl_extend("force", {}, {
|
||||
around = "a",
|
||||
inside = "i",
|
||||
around_next = "an",
|
||||
inside_next = "in",
|
||||
around_last = "al",
|
||||
inside_last = "il",
|
||||
}, opts.mappings or {})
|
||||
mappings.goto_left = nil
|
||||
mappings.goto_right = nil
|
||||
|
||||
for name, prefix in pairs(mappings) do
|
||||
name = name:gsub("^around_", ""):gsub("^inside_", "")
|
||||
for prefix, name in pairs({
|
||||
i = "inside",
|
||||
a = "around",
|
||||
il = "last",
|
||||
["in"] = "next",
|
||||
al = "last",
|
||||
an = "next",
|
||||
}) do
|
||||
ret[#ret + 1] = { prefix, group = name }
|
||||
for _, obj in ipairs(objects) do
|
||||
local desc = obj.desc
|
||||
if prefix:sub(1, 1) == "i" then
|
||||
desc = desc:gsub(" with ws", "")
|
||||
end
|
||||
ret[#ret + 1] = { prefix .. obj[1], desc = obj.desc }
|
||||
end
|
||||
end
|
||||
@ -121,15 +110,6 @@ end
|
||||
|
||||
---@param opts {skip_next: string, skip_ts: string[], skip_unbalanced: boolean, markdown: boolean}
|
||||
function M.pairs(opts)
|
||||
LazyVim.toggle.map("<leader>up", {
|
||||
name = "Mini Pairs",
|
||||
get = function()
|
||||
return not vim.g.minipairs_disable
|
||||
end,
|
||||
set = function(state)
|
||||
vim.g.minipairs_disable = not state
|
||||
end,
|
||||
})
|
||||
local pairs = require("mini.pairs")
|
||||
pairs.setup(opts)
|
||||
local open = pairs.open
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user