Compare commits
34 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1bf5f15b26 | |||
| 431ceaf329 | |||
| 1f8469a53c | |||
| b4b0234008 | |||
| 28a7f8126c | |||
| 406aa9d8b4 | |||
| ca37162cb7 | |||
| 9391ff9fa3 | |||
| 702471e454 | |||
| 4a6c0c2850 | |||
| db234ef9cb | |||
| 0e2eaa3fba | |||
| 8bfd9a50a7 | |||
| 11268d8ff1 | |||
| 927031a2de | |||
| d6bda24697 | |||
| b481b644dd | |||
| 8a34051177 | |||
| 67650528e4 | |||
| bf9887adac | |||
| 28805d1a4c | |||
| 8b2eacb6ac | |||
| f3c93701e7 | |||
| aa418a2147 | |||
| 09831414cf | |||
| 33e1da585d | |||
| 6202dd1644 | |||
| 304729b23a | |||
| d108169e95 | |||
| 4035768195 | |||
| 21470b49d9 | |||
| 5e1216867b | |||
| 427b641eb8 | |||
| d8958d78b5 |
@@ -0,0 +1,8 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
charset = utf-8
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
".": "12.26.1"
|
||||
".": "12.28.0"
|
||||
}
|
||||
|
||||
@@ -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?
|
||||
@@ -57,33 +60,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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Ask a question or start a discussion
|
||||
- name: Ask a question
|
||||
url: https://github.com/LazyVim/LazyVim/discussions
|
||||
about: Use Github discussions instead
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
## What is this PR for?
|
||||
## Description
|
||||
|
||||
<!-- Describe the big picture of your changes to communicate to the maintainers
|
||||
why we should accept this pull request. -->
|
||||
|
||||
## Does this PR fix an existing issue?
|
||||
## Related Issue(s)
|
||||
|
||||
<!--
|
||||
If this PR fixes any issues, please link to the issue here.
|
||||
- Fixes #<issue_number>
|
||||
-->
|
||||
|
||||
## Screenshots
|
||||
|
||||
<!-- Add screenshots of the changes if applicable. -->
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines.
|
||||
|
||||
@@ -12,4 +12,3 @@ jobs:
|
||||
with:
|
||||
plugin: LazyVim
|
||||
repo: LazyVim/LazyVim
|
||||
tests: true
|
||||
|
||||
+6
-5
@@ -1,8 +1,9 @@
|
||||
*.log
|
||||
.repro
|
||||
.tests
|
||||
build
|
||||
debug
|
||||
doc/tags
|
||||
/.repro
|
||||
/.tests
|
||||
/build
|
||||
/debug
|
||||
/doc/tags
|
||||
foo.*
|
||||
node_modules
|
||||
tt.*
|
||||
|
||||
@@ -1,5 +1,42 @@
|
||||
# Changelog
|
||||
|
||||
## [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)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **icons:** provide language specific icons in extras ([#3931](https://github.com/LazyVim/LazyVim/issues/3931)) ([aa418a2](https://github.com/LazyVim/LazyVim/commit/aa418a2147f52fbe3225aced3a0e7638cf15ea78))
|
||||
* **java:** allow overriding test config ([#3891](https://github.com/LazyVim/LazyVim/issues/3891)) ([8b2eacb](https://github.com/LazyVim/LazyVim/commit/8b2eacb6ac2a8df3c9eaba69fbce34abc3666ec1))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **fzf-lua:** move register_select to lazy init ([33e1da5](https://github.com/LazyVim/LazyVim/commit/33e1da585d8709bcf6c076e80a73b55ef70a9443))
|
||||
* **lazygit:** improve git browse ([#3941](https://github.com/LazyVim/LazyVim/issues/3941)) ([28805d1](https://github.com/LazyVim/LazyVim/commit/28805d1a4c09b8dccbac8db4f7c6576a29abbd40))
|
||||
|
||||
## [12.26.2](https://github.com/LazyVim/LazyVim/compare/v12.26.1...v12.26.2) (2024-07-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **lualine:** check that trouble is installed ([d108169](https://github.com/LazyVim/LazyVim/commit/d108169e951fff8c65ed8dea89b058717cc48da5))
|
||||
|
||||
## [12.26.1](https://github.com/LazyVim/LazyVim/compare/v12.26.0...v12.26.1) (2024-07-06)
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
*LazyVim.txt* For Neovim Last change: 2024 July 06
|
||||
*LazyVim.txt* For Neovim Last change: 2024 July 13
|
||||
|
||||
==============================================================================
|
||||
Table of Contents *LazyVim-table-of-contents*
|
||||
|
||||
@@ -87,7 +87,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.26.1" -- x-release-please-version
|
||||
M.version = "12.28.0" -- x-release-please-version
|
||||
LazyVim.config = M
|
||||
|
||||
---@class LazyVimOptions
|
||||
@@ -248,16 +248,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
|
||||
|
||||
|
||||
@@ -162,32 +162,47 @@ 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>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" },
|
||||
{ "<leader>w", group = "windows" },
|
||||
{ "<leader>x", group = "diagnostics/quickfix" },
|
||||
{ "[", group = "prev" },
|
||||
{ "]", group = "next" },
|
||||
{ "g", group = "goto" },
|
||||
{ "gs", group = "surround" },
|
||||
{ "z", group = "fold" },
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>?",
|
||||
function()
|
||||
require("which-key").show({ global = false })
|
||||
end,
|
||||
desc = "Buffer Local Keymaps (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,
|
||||
},
|
||||
|
||||
|
||||
@@ -190,12 +190,13 @@ return {
|
||||
end,
|
||||
config = function(_, opts)
|
||||
require("fzf-lua").setup(opts)
|
||||
require("fzf-lua").register_ui_select(opts.ui_select or nil)
|
||||
end,
|
||||
init = function()
|
||||
LazyVim.on_very_lazy(function()
|
||||
vim.ui.select = function(...)
|
||||
require("fzf-lua")
|
||||
require("lazy").load({ plugins = { "fzf-lua" } })
|
||||
local opts = LazyVim.opts("fzf-lua") or {}
|
||||
require("fzf-lua").register_ui_select(opts.ui_select or nil)
|
||||
return vim.ui.select(...)
|
||||
end
|
||||
end)
|
||||
@@ -210,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)" },
|
||||
@@ -198,6 +198,12 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
find_files = {
|
||||
find_command = { "fd", "--type", "f", "--color", "never", "-E", ".git" },
|
||||
hidden = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
@@ -137,4 +137,17 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Filetype icons
|
||||
{
|
||||
"echasnovski/mini.icons",
|
||||
opts = {
|
||||
file = {
|
||||
[".go-version"] = { glyph = "", hl = "MiniIconsBlue" },
|
||||
},
|
||||
filetype = {
|
||||
gotmpl = { glyph = "", hl = "MiniIconsGrey" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -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,12 +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"] = { require("jdtls.dap").test_class, "Run All Test" },
|
||||
["<leader>tr"] = { require("jdtls.dap").test_nearest_method, "Run Nearest Test" },
|
||||
["<leader>tT"] = { require("jdtls.dap").pick_test, "Run Test" },
|
||||
}, { mode = "n", buffer = args.buf })
|
||||
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" },
|
||||
},
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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" },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -21,22 +21,19 @@ return {
|
||||
|
||||
-- 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({
|
||||
{ "<localleader>a", group = "all" },
|
||||
{ "<localleader>b", group = "between marks" },
|
||||
{ "<localleader>c", group = "chunks" },
|
||||
{ "<localleader>f", group = "functions" },
|
||||
{ "<localleader>g", group = "goto" },
|
||||
{ "<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,
|
||||
},
|
||||
|
||||
@@ -248,4 +248,22 @@ return {
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
-- Filetype icons
|
||||
{
|
||||
"echasnovski/mini.icons",
|
||||
opts = {
|
||||
file = {
|
||||
[".eslintrc.js"] = { glyph = "", hl = "MiniIconsYellow" },
|
||||
[".node-version"] = { glyph = "", hl = "MiniIconsGreen" },
|
||||
[".prettierrc"] = { glyph = "", hl = "MiniIconsPurple" },
|
||||
[".yarnrc.yml"] = { glyph = "", hl = "MiniIconsBlue" },
|
||||
["eslint.config.js"] = { glyph = "", hl = "MiniIconsYellow" },
|
||||
["package.json"] = { glyph = "", hl = "MiniIconsGreen" },
|
||||
["tsconfig.json"] = { glyph = "", hl = "MiniIconsAzure" },
|
||||
["tsconfig.build.json"] = { glyph = "", hl = "MiniIconsAzure" },
|
||||
["yarn.lock"] = { glyph = "", hl = "MiniIconsBlue" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -88,4 +88,24 @@ return {
|
||||
table.insert(opts.config.center, 5, projects)
|
||||
end,
|
||||
},
|
||||
|
||||
-- Filetype icons
|
||||
{
|
||||
"echasnovski/mini.icons",
|
||||
opts = {
|
||||
file = {
|
||||
[".chezmoiignore"] = { glyph = "", hl = "MiniIconsGrey" },
|
||||
[".chezmoiremove"] = { glyph = "", hl = "MiniIconsGrey" },
|
||||
[".chezmoiroot"] = { glyph = "", hl = "MiniIconsGrey" },
|
||||
[".chezmoiversion"] = { glyph = "", hl = "MiniIconsGrey" },
|
||||
["bash.tmpl"] = { glyph = "", hl = "MiniIconsGrey" },
|
||||
["json.tmpl"] = { glyph = "", hl = "MiniIconsGrey" },
|
||||
["ps1.tmpl"] = { glyph = "", hl = "MiniIconsGrey" },
|
||||
["sh.tmpl"] = { glyph = "", hl = "MiniIconsGrey" },
|
||||
["toml.tmpl"] = { glyph = "", hl = "MiniIconsGrey" },
|
||||
["yaml.tmpl"] = { glyph = "", hl = "MiniIconsGrey" },
|
||||
["zsh.tmpl"] = { glyph = "", hl = "MiniIconsGrey" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ end
|
||||
|
||||
-- Add some vscode specific keymaps
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "LazyVimKeymaps",
|
||||
pattern = "LazyVimKeymapsDefaults",
|
||||
callback = function()
|
||||
vim.keymap.set("n", "<leader><space>", "<cmd>Find<cr>")
|
||||
vim.keymap.set("n", "<leader>/", [[<cmd>call VSCodeNotify('workbench.action.findInFiles')<cr>]])
|
||||
|
||||
@@ -198,7 +198,7 @@ return {
|
||||
}
|
||||
|
||||
-- do not add trouble symbols if aerial is enabled
|
||||
if vim.g.trouble_lualine then
|
||||
if vim.g.trouble_lualine and LazyVim.has("trouble.nvim") then
|
||||
local trouble = require("trouble")
|
||||
local symbols = trouble.statusline
|
||||
and trouble.statusline({
|
||||
@@ -306,7 +306,15 @@ return {
|
||||
{
|
||||
"echasnovski/mini.icons",
|
||||
lazy = true,
|
||||
opts = {},
|
||||
opts = {
|
||||
file = {
|
||||
[".keep"] = { glyph = "", hl = "MiniIconsGrey" },
|
||||
["devcontainer.json"] = { glyph = "", hl = "MiniIconsAzure" },
|
||||
},
|
||||
filetype = {
|
||||
dotenv = { glyph = "", hl = "MiniIconsYellow" },
|
||||
},
|
||||
},
|
||||
init = function()
|
||||
package.preload["nvim-web-devicons"] = function()
|
||||
require("mini.icons").mock_nvim_web_devicons()
|
||||
|
||||
@@ -159,17 +159,43 @@ function M.blame_line(opts)
|
||||
return require("lazy.util").float_cmd(cmd, opts)
|
||||
end
|
||||
|
||||
-- stylua: ignore
|
||||
M.remote_patterns = {
|
||||
{ "^(https?://.*)%.git$" , "%1" },
|
||||
{ "^git@(.+):(.+)%.git$" , "https://%1/%2" },
|
||||
{ "^git@(.+):(.+)$" , "https://%1/%2" },
|
||||
{ "^git@(.+)/(.+)$" , "https://%1/%2" },
|
||||
{ "^ssh://git@(.*)$" , "https://%1" },
|
||||
{ "ssh%.dev%.azure%.com/v3/(.*)/(.*)$", "dev.azure.com/%1/_git/%2" },
|
||||
{ "^https://%w*@(.*)" , "https://%1" },
|
||||
{ "^git@(.*)" , "https://%1" },
|
||||
{ ":%d+" , "" },
|
||||
{ "%.git$" , "" },
|
||||
}
|
||||
|
||||
---@param remote string
|
||||
function M.get_url(remote)
|
||||
local ret = remote
|
||||
for _, pattern in ipairs(M.remote_patterns) do
|
||||
ret = ret:gsub(pattern[1], pattern[2])
|
||||
end
|
||||
return ret:find("https://") == 1 and ret or ("https://%s"):format(ret)
|
||||
end
|
||||
|
||||
function M.browse()
|
||||
local lines = require("lazy.manage.process").exec({ "git", "remote", "-v" })
|
||||
local remotes = {} ---@type {name:string, url:string}[]
|
||||
|
||||
for _, line in ipairs(lines) do
|
||||
local name, url = line:match("(%S+)%s+(%S+)%s+%(fetch%)")
|
||||
if name and url then
|
||||
if url:find("git@") == 1 then
|
||||
url = url:gsub("git@(%S+):", "https://%1/"):gsub(".git$", "")
|
||||
local name, remote = line:match("(%S+)%s+(%S+)%s+%(fetch%)")
|
||||
if name and remote then
|
||||
local url = M.get_url(remote)
|
||||
if url then
|
||||
table.insert(remotes, {
|
||||
name = name,
|
||||
url = url,
|
||||
})
|
||||
end
|
||||
table.insert(remotes, { name = name, url = url })
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+42
-43
@@ -61,52 +61,51 @@ end
|
||||
|
||||
-- register all text objects with which-key
|
||||
function M.ai_whichkey()
|
||||
---@type table<string, string|table>
|
||||
local i = {
|
||||
[" "] = "Whitespace",
|
||||
['"'] = 'Balanced "',
|
||||
["'"] = "Balanced '",
|
||||
["`"] = "Balanced `",
|
||||
["("] = "Balanced (",
|
||||
[")"] = "Balanced ) including white-space",
|
||||
[">"] = "Balanced > including white-space",
|
||||
["<lt>"] = "Balanced <",
|
||||
["]"] = "Balanced ] including white-space",
|
||||
["["] = "Balanced [",
|
||||
["}"] = "Balanced } including white-space",
|
||||
["{"] = "Balanced {",
|
||||
["?"] = "User Prompt",
|
||||
_ = "Underscore",
|
||||
a = "Argument",
|
||||
b = "Balanced ), ], }",
|
||||
c = "Class",
|
||||
d = "Digit(s)",
|
||||
e = "Word in CamelCase & snake_case",
|
||||
f = "Function",
|
||||
g = "Entire file",
|
||||
i = "Indent",
|
||||
o = "Block, conditional, loop",
|
||||
q = "Quote `, \", '",
|
||||
t = "Tag",
|
||||
u = "Use/call function & method",
|
||||
U = "Use/call without dot in name",
|
||||
local objects = {
|
||||
{ " ", desc = "whitespace" },
|
||||
{ '"', 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 in name" },
|
||||
{ "[", desc = "balanced [" },
|
||||
{ "]", desc = "balanced ] including white-space" },
|
||||
{ "_", desc = "underscore" },
|
||||
{ "`", desc = "balanced `" },
|
||||
{ "a", desc = "argument" },
|
||||
{ "b", desc = "balanced )]}" },
|
||||
{ "c", desc = "class" },
|
||||
{ "d", desc = "digit(s)" },
|
||||
{ "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 function & method" },
|
||||
{ "{", desc = "balanced {" },
|
||||
{ "}", desc = "balanced } including white-space" },
|
||||
}
|
||||
local a = vim.deepcopy(i)
|
||||
for k, v in pairs(a) do
|
||||
a[k] = v:gsub(" including.*", "")
|
||||
end
|
||||
|
||||
local ic = vim.deepcopy(i)
|
||||
local ac = vim.deepcopy(a)
|
||||
for key, name in pairs({ n = "Next", l = "Last" }) do
|
||||
i[key] = vim.tbl_extend("force", { name = "Inside " .. name .. " textobject" }, ic)
|
||||
a[key] = vim.tbl_extend("force", { name = "Around " .. name .. " textobject" }, ac)
|
||||
local ret = { mode = { "o", "x" } }
|
||||
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
|
||||
ret[#ret + 1] = { prefix .. obj[1], desc = obj.desc }
|
||||
end
|
||||
end
|
||||
require("which-key").register({
|
||||
mode = { "o", "x" },
|
||||
i = i,
|
||||
a = a,
|
||||
})
|
||||
require("which-key").add(ret, { notify = false })
|
||||
end
|
||||
|
||||
---@param opts {skip_next: string, skip_ts: string[], skip_unbalanced: boolean, markdown: boolean}
|
||||
|
||||
@@ -57,7 +57,7 @@ function M.open(command, opts)
|
||||
return LazyVim.error("LazyVim.pick: picker not set")
|
||||
end
|
||||
|
||||
command = command or "auto"
|
||||
command = command ~= "auto" and command or "files"
|
||||
opts = opts or {}
|
||||
|
||||
opts = vim.deepcopy(opts)
|
||||
@@ -71,21 +71,6 @@ function M.open(command, opts)
|
||||
opts.cwd = LazyVim.root({ buf = opts.buf })
|
||||
end
|
||||
|
||||
local cwd = opts.cwd or vim.uv.cwd()
|
||||
if command == "auto" then
|
||||
command = "files"
|
||||
if
|
||||
vim.uv.fs_stat(cwd .. "/.git")
|
||||
and not vim.uv.fs_stat(cwd .. "/.ignore")
|
||||
and not vim.uv.fs_stat(cwd .. "/.rgignore")
|
||||
then
|
||||
command = "git_files"
|
||||
if opts.show_untracked == nil then
|
||||
opts.show_untracked = true
|
||||
opts.recurse_submodules = false
|
||||
end
|
||||
end
|
||||
end
|
||||
command = M.picker.commands[command] or command
|
||||
M.picker.open(command, opts)
|
||||
end
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
#!/bin/env bash
|
||||
|
||||
nvim -l tests/minit.lua --busted tests -o utfTerminal "$@"
|
||||
nvim -l tests/minit.lua --minitest
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user