Compare commits
73 Commits
Author | SHA1 | Date | |
---|---|---|---|
b35442dfe7 | |||
d58e4c4f89 | |||
5adec47431 | |||
68cf175176 | |||
90a3afac38 | |||
eed91a3e4c | |||
3d1f961232 | |||
6f91b406dd | |||
578f06e140 | |||
64afb5f007 | |||
7839498108 | |||
3e29fdf478 | |||
5795be3c19 | |||
a219e105b0 | |||
f9fdb356f2 | |||
0daa957b3c | |||
b8bdebe5be | |||
4ac249beaa | |||
d2483f19ce | |||
87ef93e8a0 | |||
b5290fd929 | |||
d6561fd27c | |||
b1a47405b9 | |||
c1b76ee235 | |||
d263cf5dd1 | |||
fd2db9e5ee | |||
8d9f2ad97e | |||
66bba787b8 | |||
865bf15f1c | |||
bab54406dc | |||
60b10deeb0 | |||
150523b77b | |||
1ceac32652 | |||
5339acacec | |||
a1335e59e1 | |||
ab0135093b | |||
dc8a3a139e | |||
9eefc6a3aa | |||
78cf0320bf | |||
706ec4b6b6 | |||
6911327a5e | |||
0f2d01dd01 | |||
448e15862a | |||
8506cb5a98 | |||
e80ed322a7 | |||
29e285d882 | |||
b20be638b3 | |||
d39cdb0596 | |||
45af7e1fed | |||
9bce054faf | |||
b3e746b637 | |||
337e9ddc00 | |||
065d72320d | |||
d01a58ef90 | |||
75ff1496bd | |||
431ceaf329 | |||
1f8469a53c | |||
b4b0234008 | |||
28a7f8126c | |||
406aa9d8b4 | |||
ca37162cb7 | |||
9391ff9fa3 | |||
702471e454 | |||
4a6c0c2850 | |||
db234ef9cb | |||
0e2eaa3fba | |||
8bfd9a50a7 | |||
11268d8ff1 | |||
927031a2de | |||
d6bda24697 | |||
b481b644dd | |||
8a34051177 | |||
67650528e4 |
7
.editorconfig
Normal file
7
.editorconfig
Normal file
@ -0,0 +1,7 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
charset = utf-8
|
2
.github/.release-please-manifest.json
vendored
2
.github/.release-please-manifest.json
vendored
@ -1,3 +1,3 @@
|
||||
{
|
||||
".": "12.27.0"
|
||||
".": "12.33.0"
|
||||
}
|
||||
|
41
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
41
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@ -6,7 +6,10 @@ body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
**Before** reporting an issue, make sure to read the [documentation](https://github.com/LazyVim/LazyVim) and search [existing issues](https://github.com/LazyVim/LazyVim/issues). Usage questions such as ***"How do I...?"*** belong in [Discussions](https://github.com/LazyVim/LazyVim/discussions) and will be closed.
|
||||
**Before** reporting an issue, make sure to read the [documentation](https://github.com/LazyVim/LazyVim)
|
||||
and search [existing issues](https://github.com/LazyVim/LazyVim/issues).
|
||||
|
||||
Usage questions such as ***"How do I...?"*** belong in [Discussions](https://github.com/LazyVim/LazyVim/discussions) and will be closed.
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Did you check docs and existing issues?
|
||||
@ -14,6 +17,8 @@ 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
|
||||
@ -57,33 +62,15 @@ body:
|
||||
label: Repro
|
||||
description: Minimal `init.lua` to reproduce this issue. Save as `repro.lua` and run with `nvim -u repro.lua`
|
||||
value: |
|
||||
-- DO NOT change the paths and don't remove the colorscheme
|
||||
local root = vim.fn.fnamemodify("./.repro", ":p")
|
||||
vim.env.LAZY_STDPATH = ".repro"
|
||||
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
|
||||
|
||||
-- set stdpaths to use .repro
|
||||
for _, name in ipairs({ "config", "data", "state", "cache" }) do
|
||||
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
|
||||
end
|
||||
|
||||
-- bootstrap lazy
|
||||
local lazypath = root .. "/plugins/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", lazypath, })
|
||||
end
|
||||
vim.opt.runtimepath:prepend(lazypath)
|
||||
|
||||
-- install plugins
|
||||
local plugins = {
|
||||
"folke/tokyonight.nvim",
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
-- add any other plugins here
|
||||
}
|
||||
require("lazy").setup(plugins, {
|
||||
root = root .. "/plugins",
|
||||
require("lazy.minit").repro({
|
||||
spec = {
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
-- add any other plugins here
|
||||
},
|
||||
})
|
||||
|
||||
vim.cmd.colorscheme("tokyonight")
|
||||
-- add anything else here
|
||||
render: Lua
|
||||
render: lua
|
||||
validations:
|
||||
required: false
|
||||
|
107
CHANGELOG.md
107
CHANGELOG.md
@ -1,5 +1,112 @@
|
||||
# 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)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* new mappings format for which-key v3. Forgot to push :) ([702471e](https://github.com/LazyVim/LazyVim/commit/702471e454ff552189ab03325dc19d0f7a601704))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **autocmds:** fixed pattern for autocommand to autoenable wrap and spell in text files ([#3975](https://github.com/LazyVim/LazyVim/issues/3975)) ([927031a](https://github.com/LazyVim/LazyVim/commit/927031a2de93f694b032a4df5e6d93fff635a496))
|
||||
* **java:** fix `config_overrides` for tests ([#3968](https://github.com/LazyVim/LazyVim/issues/3968)) ([b481b64](https://github.com/LazyVim/LazyVim/commit/b481b644ddf9f02470ec50264e63c6dd69d444f8))
|
||||
* **outline:** use new object for `symbols.filter` ([#4006](https://github.com/LazyVim/LazyVim/issues/4006)) ([db234ef](https://github.com/LazyVim/LazyVim/commit/db234ef9cbbb1b7b0efa8e3af5c446b965e7c07a))
|
||||
* **php:** `php_cs_fixer` is the correct name ([#3991](https://github.com/LazyVim/LazyVim/issues/3991)) ([8bfd9a5](https://github.com/LazyVim/LazyVim/commit/8bfd9a50a71d8b8147f7d742e8d0f05ee6cba888))
|
||||
* **vscode:** allow overriding default vscode keymaps. Fixes [#3950](https://github.com/LazyVim/LazyVim/issues/3950) ([6765052](https://github.com/LazyVim/LazyVim/commit/67650528e47a57fb687bce2d7bb61fb4f1af8f63))
|
||||
|
||||
## [12.27.0](https://github.com/LazyVim/LazyVim/compare/v12.26.2...v12.27.0) (2024-07-07)
|
||||
|
||||
|
||||
|
3
NEWS.md
3
NEWS.md
@ -2,6 +2,9 @@
|
||||
|
||||
## 12.x
|
||||
|
||||
- [nvim-spectre](https://github.com/nvim-pack/nvim-spectre) has been removed in favor of [grug-far.nvim](https://github.com/MagicDuck/grug-far.nvim).
|
||||
**grug-far.nvim** has a great UI and feels more intuitive to use.
|
||||
|
||||
- This **news** is now also available on the website at [https://www.lazyvim.org/news](https://www.lazyvim.org/news)
|
||||
|
||||
- **prettier** extra now works for all prettier supported filetypes
|
||||
|
@ -1,4 +1,4 @@
|
||||
*LazyVim.txt* For Neovim Last change: 2024 July 07
|
||||
*LazyVim.txt* For Neovim Last change: 2024 July 20
|
||||
|
||||
==============================================================================
|
||||
Table of Contents *LazyVim-table-of-contents*
|
||||
|
@ -55,6 +55,7 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||
group = augroup("close_with_q"),
|
||||
pattern = {
|
||||
"PlenaryTestPopup",
|
||||
"grug-far",
|
||||
"help",
|
||||
"lspinfo",
|
||||
"notify",
|
||||
@ -71,7 +72,11 @@ 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 })
|
||||
vim.keymap.set("n", "q", "<cmd>close<cr>", {
|
||||
buffer = event.buf,
|
||||
silent = true,
|
||||
desc = "Quit buffer",
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
@ -87,7 +92,7 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||
-- wrap and check for spell in text filetypes
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
group = augroup("wrap_spell"),
|
||||
pattern = { "*.txt", "*.tex", "*.typ", "gitcommit", "markdown" },
|
||||
pattern = { "text", "plaintex", "typst", "gitcommit", "markdown" },
|
||||
callback = function()
|
||||
vim.opt_local.wrap = true
|
||||
vim.opt_local.spell = true
|
||||
|
@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util")
|
||||
---@class LazyVimConfig: LazyVimOptions
|
||||
local M = {}
|
||||
|
||||
M.version = "12.27.0" -- x-release-please-version
|
||||
M.version = "12.33.0" -- x-release-please-version
|
||||
LazyVim.config = M
|
||||
|
||||
---@class LazyVimOptions
|
||||
@ -161,6 +161,7 @@ end
|
||||
|
||||
---@type LazyVimOptions
|
||||
local options
|
||||
local lazy_clipboard
|
||||
|
||||
---@param opts? LazyVimOptions
|
||||
function M.setup(opts)
|
||||
@ -181,6 +182,9 @@ function M.setup(opts)
|
||||
M.load("autocmds")
|
||||
end
|
||||
M.load("keymaps")
|
||||
if lazy_clipboard ~= nil then
|
||||
vim.opt.clipboard = lazy_clipboard
|
||||
end
|
||||
|
||||
LazyVim.format.setup()
|
||||
LazyVim.news.setup()
|
||||
@ -248,16 +252,17 @@ function M.load(name)
|
||||
end, { msg = "Failed loading " .. mod })
|
||||
end
|
||||
end
|
||||
local pattern = "LazyVim" .. name:sub(1, 1):upper() .. name:sub(2)
|
||||
-- always load lazyvim, then user file
|
||||
if M.defaults[name] or name == "options" then
|
||||
_load("lazyvim.config." .. name)
|
||||
vim.api.nvim_exec_autocmds("User", { pattern = pattern .. "Defaults", modeline = false })
|
||||
end
|
||||
_load("config." .. name)
|
||||
if vim.bo.filetype == "lazy" then
|
||||
-- HACK: LazyVim may have overwritten options of the Lazy ui, so reset this here
|
||||
vim.cmd([[do VimResized]])
|
||||
end
|
||||
local pattern = "LazyVim" .. name:sub(1, 1):upper() .. name:sub(2)
|
||||
vim.api.nvim_exec_autocmds("User", { pattern = pattern, modeline = false })
|
||||
end
|
||||
|
||||
@ -284,6 +289,9 @@ function M.init()
|
||||
-- this is needed to make sure options will be correctly applied
|
||||
-- after installing missing plugins
|
||||
M.load("options")
|
||||
-- defer built-in clipboard handling: "xsel" and "pbcopy" can be slow
|
||||
lazy_clipboard = vim.opt.clipboard
|
||||
vim.opt.clipboard = ""
|
||||
|
||||
if vim.g.deprecation_warnings == false then
|
||||
vim.deprecate = function() end
|
||||
|
@ -115,20 +115,19 @@ map("n", "[w", diagnostic_goto(false, "WARN"), { desc = "Prev Warning" })
|
||||
-- stylua: ignore start
|
||||
|
||||
-- toggle options
|
||||
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" })
|
||||
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)
|
||||
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)" })
|
||||
@ -175,13 +174,11 @@ map("t", "<C-/>", "<cmd>close<cr>", { desc = "Hide Terminal" })
|
||||
map("t", "<c-_>", "<cmd>close<cr>", { desc = "which_key_ignore" })
|
||||
|
||||
-- windows
|
||||
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>w", "<c-w>", { desc = "Windows", 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", "<leader>wm", function() LazyVim.toggle.maximize() end, { desc = "Maximize Toggle" })
|
||||
map("n", "<c-w>d", "<C-W>c", { desc = "Delete Window", remap = true })
|
||||
LazyVim.toggle.map("<c-w>m", LazyVim.toggle.maximize)
|
||||
|
||||
-- tabs
|
||||
map("n", "<leader><tab>l", "<cmd>tablast<cr>", { desc = "Last Tab" })
|
||||
|
@ -47,6 +47,7 @@ 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,20 +140,6 @@ 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,
|
||||
@ -171,9 +157,6 @@ 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,
|
||||
@ -197,6 +180,14 @@ 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,
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -128,13 +128,25 @@ return {
|
||||
|
||||
-- search/replace in multiple files
|
||||
{
|
||||
"nvim-pack/nvim-spectre",
|
||||
build = false,
|
||||
cmd = "Spectre",
|
||||
opts = { open_cmd = "noswapfile vnew" },
|
||||
-- stylua: ignore
|
||||
"MagicDuck/grug-far.nvim",
|
||||
opts = { headerMaxWidth = 80 },
|
||||
cmd = "GrugFar",
|
||||
keys = {
|
||||
{ "<leader>sr", function() require("spectre").open() end, desc = "Replace in Files (Spectre)" },
|
||||
{
|
||||
"<leader>sr",
|
||||
function()
|
||||
local is_visual = vim.fn.mode():lower():find("v")
|
||||
if is_visual then -- needed to make visual selection work
|
||||
vim.cmd([[normal! v]])
|
||||
end
|
||||
local grug = require("grug-far");
|
||||
(is_visual and grug.with_visual_selection or grug.grug_far)({
|
||||
prefills = { filesFilter = "*." .. vim.fn.expand("%:e") },
|
||||
})
|
||||
end,
|
||||
mode = { "n", "v" },
|
||||
desc = "Search and Replace",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@ -162,32 +174,69 @@ return {
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
opts_extend = { "spec" },
|
||||
opts = {
|
||||
plugins = { spelling = true },
|
||||
defaults = {
|
||||
mode = { "n", "v" },
|
||||
["g"] = { name = "+goto" },
|
||||
["gs"] = { name = "+surround" },
|
||||
["z"] = { name = "+fold" },
|
||||
["]"] = { name = "+next" },
|
||||
["["] = { name = "+prev" },
|
||||
["<leader><tab>"] = { name = "+tabs" },
|
||||
["<leader>b"] = { name = "+buffer" },
|
||||
["<leader>c"] = { name = "+code" },
|
||||
["<leader>f"] = { name = "+file/find" },
|
||||
["<leader>g"] = { name = "+git" },
|
||||
["<leader>gh"] = { name = "+hunks", ["_"] = "which_key_ignore" },
|
||||
["<leader>q"] = { name = "+quit/session" },
|
||||
["<leader>s"] = { name = "+search" },
|
||||
["<leader>u"] = { name = "+ui" },
|
||||
["<leader>w"] = { name = "+windows" },
|
||||
["<leader>x"] = { name = "+diagnostics/quickfix" },
|
||||
defaults = {},
|
||||
spec = {
|
||||
{
|
||||
mode = { "n", "v" },
|
||||
{ "<leader><tab>", group = "tabs" },
|
||||
{ "<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>x", group = "diagnostics/quickfix", icon = { icon = " ", color = "green" } },
|
||||
{ "[", group = "prev" },
|
||||
{ "]", group = "next" },
|
||||
{ "g", group = "goto" },
|
||||
{ "gs", group = "surround" },
|
||||
{ "z", group = "fold" },
|
||||
{
|
||||
"<leader>b",
|
||||
group = "buffer",
|
||||
expand = function()
|
||||
return require("which-key.extras").expand.buf()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"<leader>w",
|
||||
group = "windows",
|
||||
proxy = "<c-w>",
|
||||
expand = function()
|
||||
return require("which-key.extras").expand.win()
|
||||
end,
|
||||
},
|
||||
-- better descriptions
|
||||
{ "gx", desc = "Open with system app" },
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>?",
|
||||
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)",
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
local wk = require("which-key")
|
||||
wk.setup(opts)
|
||||
wk.register(opts.defaults)
|
||||
if not vim.tbl_isempty(opts.defaults) then
|
||||
LazyVim.warn("which-key: opts.defaults is deprecated. Please use opts.spec instead.")
|
||||
wk.register(opts.defaults)
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
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,14 +17,15 @@ 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 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" },
|
||||
{ "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" },
|
||||
{ "[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)" },
|
||||
|
@ -211,12 +211,12 @@ return {
|
||||
},
|
||||
{ "<leader>/", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" },
|
||||
{ "<leader>:", "<cmd>FzfLua command_history<cr>", desc = "Command History" },
|
||||
{ "<leader><space>", LazyVim.pick("auto"), desc = "Find Files (Root Dir)" },
|
||||
{ "<leader><space>", LazyVim.pick("files"), desc = "Find Files (Root Dir)" },
|
||||
-- find
|
||||
{ "<leader>fb", "<cmd>FzfLua buffers sort_mru=true sort_lastused=true<cr>", desc = "Buffers" },
|
||||
{ "<leader>fc", LazyVim.pick.config_files(), desc = "Find Config File" },
|
||||
{ "<leader>ff", LazyVim.pick("auto"), desc = "Find Files (Root Dir)" },
|
||||
{ "<leader>fF", LazyVim.pick("auto", { root = false }), desc = "Find Files (cwd)" },
|
||||
{ "<leader>ff", LazyVim.pick("files"), desc = "Find Files (Root Dir)" },
|
||||
{ "<leader>fF", LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" },
|
||||
{ "<leader>fg", "<cmd>FzfLua git_files<cr>", desc = "Find Files (git-files)" },
|
||||
{ "<leader>fr", "<cmd>FzfLua oldfiles<cr>", desc = "Recent" },
|
||||
{ "<leader>fR", LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" },
|
||||
|
@ -7,10 +7,10 @@ return {
|
||||
"ggandor/flit.nvim",
|
||||
enabled = true,
|
||||
keys = function()
|
||||
---@type LazyKeys[]
|
||||
---@type LazyKeysSpec[]
|
||||
local ret = {}
|
||||
for _, key in ipairs({ "f", "F", "t", "T" }) do
|
||||
ret[#ret + 1] = { key, mode = { "n", "x", "o" }, desc = key }
|
||||
ret[#ret + 1] = { key, mode = { "n", "x", "o" } }
|
||||
end
|
||||
return ret
|
||||
end,
|
||||
|
@ -16,7 +16,7 @@ return {
|
||||
local opts = {
|
||||
symbols = {
|
||||
icons = {},
|
||||
filter = LazyVim.config.kind_filter,
|
||||
filter = vim.deepcopy(LazyVim.config.kind_filter),
|
||||
},
|
||||
keymaps = {
|
||||
up_and_jump = "<up>",
|
||||
|
@ -64,7 +64,9 @@ return {
|
||||
"folke/which-key.nvim",
|
||||
optional = true,
|
||||
opts = {
|
||||
defaults = { ["<leader>o"] = { name = "+overseer" } },
|
||||
spec = {
|
||||
{ "<leader>o", group = "overseer" },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -92,12 +92,12 @@ return {
|
||||
},
|
||||
{ "<leader>/", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" },
|
||||
{ "<leader>:", "<cmd>Telescope command_history<cr>", desc = "Command History" },
|
||||
{ "<leader><space>", LazyVim.pick("auto"), desc = "Find Files (Root Dir)" },
|
||||
{ "<leader><space>", LazyVim.pick("files"), desc = "Find Files (Root Dir)" },
|
||||
-- find
|
||||
{ "<leader>fb", "<cmd>Telescope buffers sort_mru=true sort_lastused=true<cr>", desc = "Buffers" },
|
||||
{ "<leader>fc", LazyVim.pick.config_files(), desc = "Find Config File" },
|
||||
{ "<leader>ff", LazyVim.pick("auto"), desc = "Find Files (Root Dir)" },
|
||||
{ "<leader>fF", LazyVim.pick("auto", { root = false }), desc = "Find Files (cwd)" },
|
||||
{ "<leader>ff", LazyVim.pick("files"), desc = "Find Files (Root Dir)" },
|
||||
{ "<leader>fF", LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" },
|
||||
{ "<leader>fg", "<cmd>Telescope git_files<cr>", desc = "Find Files (git-files)" },
|
||||
{ "<leader>fr", "<cmd>Telescope oldfiles<cr>", desc = "Recent" },
|
||||
{ "<leader>fR", LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" },
|
||||
@ -165,6 +165,20 @@ 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 = " ",
|
||||
@ -198,6 +212,12 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
find_files = {
|
||||
find_command = find_command,
|
||||
hidden = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
@ -190,30 +190,40 @@ return {
|
||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||
if client and client.name == "jdtls" then
|
||||
local wk = require("which-key")
|
||||
wk.register({
|
||||
["<leader>cx"] = { name = "+extract" },
|
||||
["<leader>cxv"] = { require("jdtls").extract_variable_all, "Extract Variable" },
|
||||
["<leader>cxc"] = { require("jdtls").extract_constant, "Extract Constant" },
|
||||
["gs"] = { require("jdtls").super_implementation, "Goto Super" },
|
||||
["gS"] = { require("jdtls.tests").goto_subjects, "Goto Subjects" },
|
||||
["<leader>co"] = { require("jdtls").organize_imports, "Organize Imports" },
|
||||
}, { mode = "n", buffer = args.buf })
|
||||
wk.register({
|
||||
["<leader>c"] = { name = "+code" },
|
||||
["<leader>cx"] = { name = "+extract" },
|
||||
["<leader>cxm"] = {
|
||||
[[<ESC><CMD>lua require('jdtls').extract_method(true)<CR>]],
|
||||
"Extract Method",
|
||||
wk.add({
|
||||
{
|
||||
mode = "n",
|
||||
buffer = args.buf,
|
||||
{ "<leader>cx", group = "extract" },
|
||||
{ "<leader>cxv", require("jdtls").extract_variable_all, desc = "Extract Variable" },
|
||||
{ "<leader>cxc", require("jdtls").extract_constant, desc = "Extract Constant" },
|
||||
{ "gs", require("jdtls").super_implementation, desc = "Goto Super" },
|
||||
{ "gS", require("jdtls.tests").goto_subjects, desc = "Goto Subjects" },
|
||||
{ "<leader>co", require("jdtls").organize_imports, desc = "Organize Imports" },
|
||||
},
|
||||
["<leader>cxv"] = {
|
||||
[[<ESC><CMD>lua require('jdtls').extract_variable_all(true)<CR>]],
|
||||
"Extract Variable",
|
||||
})
|
||||
wk.add({
|
||||
{
|
||||
mode = "v",
|
||||
buffer = args.buf,
|
||||
{ "<leader>cx", group = "extract" },
|
||||
{
|
||||
"<leader>cxm",
|
||||
[[<ESC><CMD>lua require('jdtls').extract_method(true)<CR>]],
|
||||
desc = "Extract Method",
|
||||
},
|
||||
{
|
||||
"<leader>cxv",
|
||||
[[<ESC><CMD>lua require('jdtls').extract_variable_all(true)<CR>]],
|
||||
desc = "Extract Variable",
|
||||
},
|
||||
{
|
||||
"<leader>cxc",
|
||||
[[<ESC><CMD>lua require('jdtls').extract_constant(true)<CR>]],
|
||||
desc = "Extract Constant",
|
||||
},
|
||||
},
|
||||
["<leader>cxc"] = {
|
||||
[[<ESC><CMD>lua require('jdtls').extract_constant(true)<CR>]],
|
||||
"Extract Constant",
|
||||
},
|
||||
}, { mode = "v", buffer = args.buf })
|
||||
})
|
||||
|
||||
if opts.dap and LazyVim.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then
|
||||
-- custom init for Java debugger
|
||||
@ -223,22 +233,32 @@ return {
|
||||
-- Java Test require Java debugger to work
|
||||
if opts.test and mason_registry.is_installed("java-test") then
|
||||
-- custom keymaps for Java test runner (not yet compatible with neotest)
|
||||
wk.register({
|
||||
["<leader>t"] = { name = "+test" },
|
||||
["<leader>tt"] = {
|
||||
function()
|
||||
require("jdtls.dap").test_class({ config_overrides = opts.test.config_overrides })
|
||||
end,
|
||||
"Run All Test",
|
||||
wk.add({
|
||||
{
|
||||
mode = "n",
|
||||
buffer = args.buf,
|
||||
{ "<leader>t", group = "test" },
|
||||
{
|
||||
"<leader>tt",
|
||||
function()
|
||||
require("jdtls.dap").test_class({
|
||||
config_overrides = type(opts.test) ~= "boolean" and opts.test.config_overrides or nil,
|
||||
})
|
||||
end,
|
||||
desc = "Run All Test",
|
||||
},
|
||||
{
|
||||
"<leader>tr",
|
||||
function()
|
||||
require("jdtls.dap").test_nearest_method({
|
||||
config_overrides = type(opts.test) ~= "boolean" and opts.test.config_overrides or nil,
|
||||
})
|
||||
end,
|
||||
desc = "Run Nearest Test",
|
||||
},
|
||||
{ "<leader>tT", require("jdtls.dap").pick_test, desc = "Run Test" },
|
||||
},
|
||||
["<leader>tr"] = {
|
||||
function()
|
||||
require("jdtls.dap").test_nearest_method({ config_overrides = opts.test.config_overrides })
|
||||
end,
|
||||
"Run Nearest Test",
|
||||
},
|
||||
["<leader>tT"] = { require("jdtls.dap").pick_test, "Run Test" },
|
||||
}, { mode = "n", buffer = args.buf })
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
|
125
lua/lazyvim/plugins/extras/lang/lean.lua
Normal file
125
lua/lazyvim/plugins/extras/lang/lean.lua
Normal file
@ -0,0 +1,125 @@
|
||||
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,
|
||||
},
|
||||
},
|
||||
}
|
@ -100,6 +100,7 @@ return {
|
||||
headline_highlights = {},
|
||||
-- disable bullets for now. See https://github.com/lukas-reineke/headlines.nvim/issues/66
|
||||
bullets = {},
|
||||
quote_string = false,
|
||||
}
|
||||
for i = 1, 6 do
|
||||
local hl = "Headline" .. i
|
||||
|
39
lua/lazyvim/plugins/extras/lang/ocaml.lua
Normal file
39
lua/lazyvim/plugins/extras/lang/ocaml.lua
Normal file
@ -0,0 +1,39 @@
|
||||
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,6 +75,9 @@ return {
|
||||
type = "executable",
|
||||
command = vim.fn.exepath("netcoredbg"),
|
||||
args = { "--interpreter=vscode" },
|
||||
options = {
|
||||
detached = false,
|
||||
},
|
||||
}
|
||||
end
|
||||
for _, lang in ipairs({ "cs", "fsharp", "vb" }) do
|
||||
|
@ -74,13 +74,13 @@ return {
|
||||
php = { "phpcs" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
optional = true,
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
php = { "php-cs-fixer" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
optional = true,
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
php = { "php_cs_fixer" },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -19,24 +19,22 @@ 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")
|
||||
-- Workaround from https://github.com/folke/which-key.nvim/issues/514#issuecomment-1987286901
|
||||
wk.register({
|
||||
["<localleader>"] = {
|
||||
a = { name = "+(a)ll", ["🚫"] = "which_key_ignore" },
|
||||
b = { name = "+(b)etween marks", ["🚫"] = "which_key_ignore" },
|
||||
c = { name = "+(c)hunks", ["🚫"] = "which_key_ignore" },
|
||||
f = { name = "+(f)unctions", ["🚫"] = "which_key_ignore" },
|
||||
g = { name = "+(g)oto", ["🚫"] = "which_key_ignore" },
|
||||
k = { name = "+(k)nit", ["🚫"] = "which_key_ignore" },
|
||||
p = { name = "+(p)aragraph", ["🚫"] = "which_key_ignore" },
|
||||
q = { name = "+(q)uarto", ["🚫"] = "which_key_ignore" },
|
||||
r = { name = "+(r) general", ["🚫"] = "which_key_ignore" },
|
||||
s = { name = "+(s)plit or (s)end", ["🚫"] = "which_key_ignore" },
|
||||
t = { name = "+(t)erminal", ["🚫"] = "which_key_ignore" },
|
||||
v = { name = "+(v)iew", ["🚫"] = "which_key_ignore" },
|
||||
},
|
||||
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" },
|
||||
{ "<localleader>r", group = "r general" },
|
||||
{ "<localleader>s", group = "split or send" },
|
||||
{ "<localleader>t", group = "terminal" },
|
||||
{ "<localleader>v", group = "view" },
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
@ -1,3 +1,17 @@
|
||||
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({
|
||||
@ -11,12 +25,29 @@ return {
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
solargraph = {},
|
||||
ruby_lsp = {
|
||||
enabled = lsp == "ruby_lsp",
|
||||
},
|
||||
solargraph = {
|
||||
enabled = lsp == "solargraph",
|
||||
},
|
||||
rubocop = {
|
||||
enabled = formatter == "rubocop",
|
||||
},
|
||||
standardrb = {
|
||||
enabled = formatter == "standardrb",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = { ensure_installed = { "erb-formatter", "erb-lint" } },
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
optional = true,
|
||||
@ -27,6 +58,16 @@ return {
|
||||
end,
|
||||
},
|
||||
},
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
optional = true,
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
ruby = { formatter },
|
||||
eruby = { "erb-format" },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvim-neotest/neotest",
|
||||
optional = true,
|
||||
|
@ -40,6 +40,17 @@ 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,6 +56,9 @@ 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,6 +14,23 @@ return {
|
||||
end, { expr = true })
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "grug-far",
|
||||
callback = function()
|
||||
vim.b.minianimate_disable = 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 = {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user