Compare commits
67 Commits
Author | SHA1 | Date | |
---|---|---|---|
ca1880da0a | |||
09fafb946a | |||
8281bd2f63 | |||
aa28119aa6 | |||
5d0e10a30a | |||
0b99c9f788 | |||
47111bd2db | |||
318a4c8304 | |||
e865b9abe1 | |||
31505842be | |||
01c7eeebd0 | |||
428bdf768f | |||
e4eb4e1603 | |||
6b1efe78e2 | |||
b37616c203 | |||
d3440766d0 | |||
855b1ccc7d | |||
f54d95d965 | |||
ebd002f135 | |||
b95644448e | |||
41f515caae | |||
cbf1797f4c | |||
2e7ad2b825 | |||
ba49339fe3 | |||
84986b3729 | |||
986a6374f4 | |||
30d03eda5b | |||
d6bb907cf0 | |||
b2bceeed77 | |||
86fe83f311 | |||
04f17cb86b | |||
9013f6e274 | |||
6ffc89512e | |||
e049928b8b | |||
7c593dce1f | |||
47edc8918a | |||
f7b0c853cc | |||
448d502947 | |||
57c7ba1c0d | |||
2ec4da7fa5 | |||
0731f08ee4 | |||
00339b7b56 | |||
34a5d32561 | |||
1897617c98 | |||
41765a4041 | |||
ad6f6cfffd | |||
d31772f981 | |||
6a01c9a180 | |||
b929413ddd | |||
56f092f1a8 | |||
821672a0db | |||
8ce862e12e | |||
952a0cfb96 | |||
d69d55afd4 | |||
7a36e2989c | |||
049fe77c3c | |||
5a47492535 | |||
15f5a229d9 | |||
bb4a7fe410 | |||
419086e8a3 | |||
49ae2344a1 | |||
1efe3a96b2 | |||
5ed3250f24 | |||
9c1a5620ed | |||
08422bf559 | |||
fc236b3a2a | |||
01fbeb139b |
145
CHANGELOG.md
145
CHANGELOG.md
@ -1,5 +1,150 @@
|
||||
# Changelog
|
||||
|
||||
## [4.13.1](https://github.com/LazyVim/LazyVim/compare/v4.13.0...v4.13.1) (2023-06-22)
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* **treesitter:** better way of loading treesitter-textobjects ([09fafb9](https://github.com/LazyVim/LazyVim/commit/09fafb946aefd8434f479656c22b90d9bc63c684))
|
||||
|
||||
## [4.13.0](https://github.com/LazyVim/LazyVim/compare/v4.12.0...v4.13.0) (2023-06-22)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **flash:** add treesitter to normal mode as well ([aa28119](https://github.com/LazyVim/LazyVim/commit/aa28119aa6526d26920da25c35e83d856a8584fb))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **neo-tree:** updated some icons to use Nerd Fonts v3. Fixes [#957](https://github.com/LazyVim/LazyVim/issues/957) ([0b99c9f](https://github.com/LazyVim/LazyVim/commit/0b99c9f788f04d658b4370c8f553542563cd3482))
|
||||
|
||||
## [4.12.0](https://github.com/LazyVim/LazyVim/compare/v4.11.0...v4.12.0) (2023-06-21)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* added extra for flash.nvim ([318a4c8](https://github.com/LazyVim/LazyVim/commit/318a4c8304091422dfdfcec44dae7a676d999ee1))
|
||||
|
||||
## [4.11.0](https://github.com/LazyVim/LazyVim/compare/v4.10.0...v4.11.0) (2023-06-21)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* added support for the new builtin inlay hints ([01c7eee](https://github.com/LazyVim/LazyVim/commit/01c7eeebd0641bd952e3c518dd28b178aed8e148))
|
||||
|
||||
## [4.10.0](https://github.com/LazyVim/LazyVim/compare/v4.9.0...v4.10.0) (2023-06-19)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **extras:** add ruby as extras for languages ([#881](https://github.com/LazyVim/LazyVim/issues/881)) ([b37616c](https://github.com/LazyVim/LazyVim/commit/b37616c20385520c2a06faca1a2f8954b015af5d))
|
||||
* **treesitter:** allow run TSUpdateSync from command line ([#944](https://github.com/LazyVim/LazyVim/issues/944)) ([6b1efe7](https://github.com/LazyVim/LazyVim/commit/6b1efe78e2b7fd5c40850d771c339bebae39ee49))
|
||||
|
||||
## [4.9.0](https://github.com/LazyVim/LazyVim/compare/v4.8.1...v4.9.0) (2023-06-17)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **edgy:** added LazyVim resize keymaps to edgy ([ba49339](https://github.com/LazyVim/LazyVim/commit/ba49339fe314ec193ccd494be80818d7ebc5a3bd))
|
||||
* **edgy:** added support for neotest ([84986b3](https://github.com/LazyVim/LazyVim/commit/84986b37291c4c0874a6012ff9927d274bdaad0e))
|
||||
* **util:** LazyVim terminals can now be opened/reopened with a count ([41f515c](https://github.com/LazyVim/LazyVim/commit/41f515caae653b91a93f24f4811ebeccf3457766))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **keymaps:** disable ctrl-hjkl for lazygit. Fixes [#905](https://github.com/LazyVim/LazyVim/issues/905) ([ebd002f](https://github.com/LazyVim/LazyVim/commit/ebd002f135b02f38654d14ea8c46d831c9054b7e))
|
||||
* **which-key:** don't load which-key as a noice dep ([f54d95d](https://github.com/LazyVim/LazyVim/commit/f54d95d96511e1e8a575573b937a99338f178639))
|
||||
|
||||
## [4.8.1](https://github.com/LazyVim/LazyVim/compare/v4.8.0...v4.8.1) (2023-06-09)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **edgy:** make noice windows 0.4 height ([30d03ed](https://github.com/LazyVim/LazyVim/commit/30d03eda5b42a783fdb2ed294f6ec83d2825d2d0))
|
||||
* **keymaps:** dont map jk in visual. Use x instead of v. Fixes [#912](https://github.com/LazyVim/LazyVim/issues/912) ([d6bb907](https://github.com/LazyVim/LazyVim/commit/d6bb907cf042463073540f7334e4271a4d2fb108))
|
||||
|
||||
## [4.8.0](https://github.com/LazyVim/LazyVim/compare/v4.7.0...v4.8.0) (2023-06-09)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **edgy:** added leader-ue to toggle edgy sidebars ([04f17cb](https://github.com/LazyVim/LazyVim/commit/04f17cb86b7794fe74894e67bd09dafc0bc440d0))
|
||||
* **edgy:** neo-tree filessystem is now also a pinned view ([6ffc895](https://github.com/LazyVim/LazyVim/commit/6ffc89512e998f01b3dc1856a689de6ffdec0b9e))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **keymaps:** better j/k for visual mode ([#902](https://github.com/LazyVim/LazyVim/issues/902)) ([e049928](https://github.com/LazyVim/LazyVim/commit/e049928b8bb3a385a186617a97c56cfb8f74a6f8))
|
||||
|
||||
## [4.7.0](https://github.com/LazyVim/LazyVim/compare/v4.6.2...v4.7.0) (2023-06-08)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **edgy:** added `<leader>ue` to quickly jump to an edgy window ([0731f08](https://github.com/LazyVim/LazyVim/commit/0731f08ee43138b61eaf02ac00110babf61be99d))
|
||||
* **edgy:** added noice ([47edc89](https://github.com/LazyVim/LazyVim/commit/47edc8918a8754ddd3008c106ebda87f2847373e))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **edgy:** dont layout toggleterm floats ([f7b0c85](https://github.com/LazyVim/LazyVim/commit/f7b0c853cc9b6bd035a637a85d3979f040e46c6f))
|
||||
* **format:** eslint should respect autoformat ([#897](https://github.com/LazyVim/LazyVim/issues/897)) ([2ec4da7](https://github.com/LazyVim/LazyVim/commit/2ec4da7fa525c2e1a8c3865d590a77c31f5c58e1))
|
||||
* **qf:** better error message. Fixes [#892](https://github.com/LazyVim/LazyVim/issues/892) ([448d502](https://github.com/LazyVim/LazyVim/commit/448d502947a3e8a81a2ed1f117f72f2e5361082f))
|
||||
|
||||
## [4.6.2](https://github.com/LazyVim/LazyVim/compare/v4.6.1...v4.6.2) (2023-06-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **keymaps:** terminal show/hide ([1897617](https://github.com/LazyVim/LazyVim/commit/1897617c98807ce9dd8eaa1f495a2d49a6166316))
|
||||
|
||||
## [4.6.1](https://github.com/LazyVim/LazyVim/compare/v4.6.0...v4.6.1) (2023-06-05)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **edgy:** dont edit help buffers in edgy ([ad6f6cf](https://github.com/LazyVim/LazyVim/commit/ad6f6cfffde6da9239d92a76f85544a7e2c4f63d))
|
||||
* **keymaps:** added c-_ mapped to c-/ to make it work in some terminals ([d31772f](https://github.com/LazyVim/LazyVim/commit/d31772f981d41ae84bb4b6e86c28d95f01100a37))
|
||||
|
||||
## [4.6.0](https://github.com/LazyVim/LazyVim/compare/v4.5.1...v4.6.0) (2023-06-05)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* added extra for edgy.nvim ([56f092f](https://github.com/LazyVim/LazyVim/commit/56f092f1a8f37036253a5c1f1253d0eebac6dd61))
|
||||
* **copilot:** enable copilot in markdown and help files ([b929413](https://github.com/LazyVim/LazyVim/commit/b929413ddd9afd64e12f0a6ec2969e3692284795))
|
||||
|
||||
## [4.5.1](https://github.com/LazyVim/LazyVim/compare/v4.5.0...v4.5.1) (2023-06-05)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **keymaps:** remove `c-w` mapping ([952a0cf](https://github.com/LazyVim/LazyVim/commit/952a0cfb96e7258dcbe8c9f4d8bdfd978888f17c))
|
||||
|
||||
## [4.5.0](https://github.com/LazyVim/LazyVim/compare/v4.4.0...v4.5.0) (2023-06-03)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **keymaps:** added `<c-/>` in normal/terminal mode to toggle main terminal ([7a36e29](https://github.com/LazyVim/LazyVim/commit/7a36e2989c3d62e8dbaf4036f5c4551929c565a5))
|
||||
* **keymaps:** added some useful keymaps for terminals ([49ae234](https://github.com/LazyVim/LazyVim/commit/49ae2344a18f93c5b4209357e265a2732365ab19))
|
||||
* **neo-tree:** enabled document_symbols for neo-tree ([419086e](https://github.com/LazyVim/LazyVim/commit/419086e8a393df05ae1311e7580e034051df85eb))
|
||||
* **noice:** route some undo messages to the mini view ([fc236b3](https://github.com/LazyVim/LazyVim/commit/fc236b3a2a90001df11ed4a6bad7bce87f459cf9))
|
||||
* **util:** LazyVim terminals are now persistent by default (toggleterm) ([5a47492](https://github.com/LazyVim/LazyVim/commit/5a4749253501569ec0ae2c644ed778e45ad637c0))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **indentscope:** dont use indentscope/blankline for lazyterm/toggleterm/notify ([15f5a22](https://github.com/LazyVim/LazyVim/commit/15f5a229d9b9fcdfd980050e7fe8dff74313d9fd))
|
||||
* **lualine:** dont load copilot when not available. Fixes [#872](https://github.com/LazyVim/LazyVim/issues/872) ([5ed3250](https://github.com/LazyVim/LazyVim/commit/5ed3250f2475f498cd14643f4788ee95108f2ada))
|
||||
* **spectre:** make spectre behave with regards to swap files ([bb4a7fe](https://github.com/LazyVim/LazyVim/commit/bb4a7fe410d8aaf9507cd2a8ed7c7680852cf297))
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* **illuminate:** on large files >2000 lines, enable lsp references only ([08422bf](https://github.com/LazyVim/LazyVim/commit/08422bf559cb74a2e673e60d551269cbcb2e18df))
|
||||
|
||||
## [4.4.0](https://github.com/LazyVim/LazyVim/compare/v4.3.1...v4.4.0) (2023-05-29)
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 May 29
|
||||
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 June 22
|
||||
|
||||
==============================================================================
|
||||
Table of Contents *LazyVim-table-of-contents*
|
||||
|
@ -16,8 +16,8 @@ local function map(mode, lhs, rhs, opts)
|
||||
end
|
||||
|
||||
-- better up/down
|
||||
map("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||
map("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||
map({ "n", "x" }, "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||
map({ "n", "x" }, "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||
|
||||
-- Move to window using the <ctrl> hjkl keys
|
||||
map("n", "<C-h>", "<C-w>h", { desc = "Go to left window", remap = true })
|
||||
@ -112,10 +112,13 @@ map("n", "<leader>ul", function() Util.toggle("relativenumber", true) Util.toggl
|
||||
map("n", "<leader>ud", Util.toggle_diagnostics, { desc = "Toggle Diagnostics" })
|
||||
local conceallevel = vim.o.conceallevel > 0 and vim.o.conceallevel or 3
|
||||
map("n", "<leader>uc", function() Util.toggle("conceallevel", false, {0, conceallevel}) end, { desc = "Toggle Conceal" })
|
||||
if vim.lsp.buf.inlay_hint then
|
||||
map("n", "<leader>uh", function() vim.lsp.buf.inlay_hint(0, nil) end, { desc = "Toggle Inlay Hints" })
|
||||
end
|
||||
|
||||
-- lazygit
|
||||
map("n", "<leader>gg", function() Util.float_term({ "lazygit" }, { cwd = Util.get_root(), esc_esc = false }) end, { desc = "Lazygit (root dir)" })
|
||||
map("n", "<leader>gG", function() Util.float_term({ "lazygit" }, {esc_esc = false}) end, { desc = "Lazygit (cwd)" })
|
||||
map("n", "<leader>gg", function() Util.float_term({ "lazygit" }, { cwd = Util.get_root(), esc_esc = false, ctrl_hjkl = false }) end, { desc = "Lazygit (root dir)" })
|
||||
map("n", "<leader>gG", function() Util.float_term({ "lazygit" }, {esc_esc = false, ctrl_hjkl = false}) end, { desc = "Lazygit (cwd)" })
|
||||
|
||||
-- quit
|
||||
map("n", "<leader>qq", "<cmd>qa<cr>", { desc = "Quit all" })
|
||||
@ -126,9 +129,20 @@ if vim.fn.has("nvim-0.9.0") == 1 then
|
||||
end
|
||||
|
||||
-- floating terminal
|
||||
map("n", "<leader>ft", function() Util.float_term(nil, { cwd = Util.get_root() }) end, { desc = "Terminal (root dir)" })
|
||||
local lazyterm = function() Util.float_term(nil, { cwd = Util.get_root() }) end
|
||||
map("n", "<leader>ft", lazyterm, { desc = "Terminal (root dir)" })
|
||||
map("n", "<leader>fT", function() Util.float_term() end, { desc = "Terminal (cwd)" })
|
||||
map("n", "<c-/>", lazyterm, { desc = "Terminal (root dir)" })
|
||||
map("n", "<c-_>", lazyterm, { desc = "which_key_ignore" })
|
||||
|
||||
-- Terminal Mappings
|
||||
map("t", "<esc><esc>", "<c-\\><c-n>", { desc = "Enter Normal Mode" })
|
||||
map("t", "<C-h>", "<cmd>wincmd h<cr>", { desc = "Go to left window" })
|
||||
map("t", "<C-j>", "<cmd>wincmd j<cr>", { desc = "Go to lower window" })
|
||||
map("t", "<C-k>", "<cmd>wincmd k<cr>", { desc = "Go to upper window" })
|
||||
map("t", "<C-l>", "<cmd>wincmd l<cr>", { desc = "Go to right window" })
|
||||
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 })
|
||||
|
@ -42,6 +42,7 @@ return {
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
},
|
||||
opts = function()
|
||||
vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true })
|
||||
local cmp = require("cmp")
|
||||
return {
|
||||
completion = {
|
||||
@ -82,7 +83,7 @@ return {
|
||||
},
|
||||
experimental = {
|
||||
ghost_text = {
|
||||
hl_group = "LspCodeLens",
|
||||
hl_group = "CmpGhostText",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -37,6 +37,8 @@ return {
|
||||
end
|
||||
end,
|
||||
opts = {
|
||||
sources = { "filesystem", "buffers", "git_status", "document_symbols" },
|
||||
open_files_do_not_replace_types = { "terminal", "Trouble", "qf", "Outline" },
|
||||
filesystem = {
|
||||
bind_to_cwd = false,
|
||||
follow_current_file = true,
|
||||
@ -54,6 +56,16 @@ return {
|
||||
expander_expanded = "",
|
||||
expander_highlight = "NeoTreeExpander",
|
||||
},
|
||||
icon = {
|
||||
folder_empty = "",
|
||||
folder_empty_open = "",
|
||||
},
|
||||
git_status = {
|
||||
symbols = {
|
||||
renamed = "",
|
||||
unstaged = "",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
@ -72,6 +84,8 @@ return {
|
||||
-- search/replace in multiple files
|
||||
{
|
||||
"nvim-pack/nvim-spectre",
|
||||
cmd = "Spectre",
|
||||
opts = { open_cmd = "noswapfile vnew" },
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>sr", function() require("spectre").open() end, desc = "Replace in files (Spectre)" },
|
||||
@ -303,7 +317,13 @@ return {
|
||||
{
|
||||
"RRethy/vim-illuminate",
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
opts = { delay = 200 },
|
||||
opts = {
|
||||
delay = 200,
|
||||
large_file_cutoff = 2000,
|
||||
large_file_overrides = {
|
||||
providers = { "lsp" },
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("illuminate").configure(opts)
|
||||
|
||||
@ -357,7 +377,10 @@ return {
|
||||
if require("trouble").is_open() then
|
||||
require("trouble").previous({ skip_groups = true, jump = true })
|
||||
else
|
||||
vim.cmd.cprev()
|
||||
local ok, err = pcall(vim.cmd.cprev)
|
||||
if not ok then
|
||||
vim.notify(err, vim.log.levels.ERROR)
|
||||
end
|
||||
end
|
||||
end,
|
||||
desc = "Previous trouble/quickfix item",
|
||||
@ -368,7 +391,10 @@ return {
|
||||
if require("trouble").is_open() then
|
||||
require("trouble").next({ skip_groups = true, jump = true })
|
||||
else
|
||||
vim.cmd.cnext()
|
||||
local ok, err = pcall(vim.cmd.cnext)
|
||||
if not ok then
|
||||
vim.notify(err, vim.log.levels.ERROR)
|
||||
end
|
||||
end
|
||||
end,
|
||||
desc = "Next trouble/quickfix item",
|
||||
|
@ -8,6 +8,10 @@ return {
|
||||
opts = {
|
||||
suggestion = { enabled = false },
|
||||
panel = { enabled = false },
|
||||
filetypes = {
|
||||
markdown = true,
|
||||
help = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -33,6 +37,9 @@ return {
|
||||
return ok and #clients > 0
|
||||
end,
|
||||
color = function()
|
||||
if not package.loaded["copilot"] then
|
||||
return
|
||||
end
|
||||
local status = require("copilot.api").status.data
|
||||
return colors[status.status] or colors[""]
|
||||
end,
|
||||
|
26
lua/lazyvim/plugins/extras/editor/flash.lua
Normal file
26
lua/lazyvim/plugins/extras/editor/flash.lua
Normal file
@ -0,0 +1,26 @@
|
||||
return {
|
||||
{ "ggandor/leap.nvim", enabled = false },
|
||||
{ "ggandor/flit.nvim", enabled = false },
|
||||
{
|
||||
"folke/flash.nvim",
|
||||
event = "VeryLazy",
|
||||
---@type Flash.Config
|
||||
opts = {},
|
||||
keys = {
|
||||
{
|
||||
"s",
|
||||
mode = { "n", "x", "o" },
|
||||
function()
|
||||
require("flash").jump()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"S",
|
||||
mode = { "n", "o", "x" },
|
||||
function()
|
||||
require("flash").treesitter()
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
57
lua/lazyvim/plugins/extras/lang/ruby.lua
Normal file
57
lua/lazyvim/plugins/extras/lang/ruby.lua
Normal file
@ -0,0 +1,57 @@
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
vim.list_extend(opts.ensure_installed, {
|
||||
"ruby",
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = function(_, opts)
|
||||
vim.list_extend(opts.ensure_installed, {
|
||||
"solargraph",
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
solargraph = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
optional = true,
|
||||
dependencies = {
|
||||
"suketa/nvim-dap-ruby",
|
||||
config = function()
|
||||
require("dap-ruby").setup()
|
||||
end,
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvim-neotest/neotest",
|
||||
optional = true,
|
||||
dependencies = {
|
||||
"olimorris/neotest-rspec",
|
||||
},
|
||||
opts = {
|
||||
adapters = {
|
||||
["neotest-rspec"] = {
|
||||
-- NOTE: By default neotest-rspec uses the system wide rspec gem instead of the one through bundler
|
||||
-- rspec_cmd = function()
|
||||
-- return vim.tbl_flatten({
|
||||
-- "bundle",
|
||||
-- "exec",
|
||||
-- "rspec",
|
||||
-- })
|
||||
-- end,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
@ -16,6 +16,11 @@ return {
|
||||
eslint = function()
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
callback = function(event)
|
||||
if not require("lazyvim.plugins.lsp.format").enabled() then
|
||||
-- exit early if autoformat is not enabled
|
||||
return
|
||||
end
|
||||
|
||||
local client = vim.lsp.get_active_clients({ bufnr = event.buf, name = "eslint" })[1]
|
||||
if client then
|
||||
local diag = vim.diagnostic.get(event.buf, { namespace = vim.lsp.diagnostic.get_namespace(client.id) })
|
||||
|
156
lua/lazyvim/plugins/extras/ui/edgy.lua
Normal file
156
lua/lazyvim/plugins/extras/ui/edgy.lua
Normal file
@ -0,0 +1,156 @@
|
||||
return {
|
||||
-- edgy
|
||||
{
|
||||
"folke/edgy.nvim",
|
||||
event = "VeryLazy",
|
||||
keys = {
|
||||
{
|
||||
"<leader>ue",
|
||||
function()
|
||||
require("edgy").toggle()
|
||||
end,
|
||||
desc = "Edgy Toggle",
|
||||
},
|
||||
-- stylua: ignore
|
||||
{ "<leader>uE", function() require("edgy").select() end, desc = "Edgy Select Window" },
|
||||
},
|
||||
opts = {
|
||||
bottom = {
|
||||
{
|
||||
ft = "toggleterm",
|
||||
size = { height = 0.4 },
|
||||
filter = function(buf, win)
|
||||
return vim.api.nvim_win_get_config(win).relative == ""
|
||||
end,
|
||||
},
|
||||
{
|
||||
ft = "noice",
|
||||
size = { height = 0.4 },
|
||||
filter = function(buf, win)
|
||||
return vim.api.nvim_win_get_config(win).relative == ""
|
||||
end,
|
||||
},
|
||||
{
|
||||
ft = "lazyterm",
|
||||
title = "LazyTerm",
|
||||
size = { height = 0.4 },
|
||||
filter = function(buf)
|
||||
return not vim.b[buf].lazyterm_cmd
|
||||
end,
|
||||
},
|
||||
"Trouble",
|
||||
{ ft = "qf", title = "QuickFix" },
|
||||
{
|
||||
ft = "help",
|
||||
size = { height = 20 },
|
||||
-- don't open help files in edgy that we're editing
|
||||
filter = function(buf)
|
||||
return vim.bo[buf].buftype == "help"
|
||||
end,
|
||||
},
|
||||
{ ft = "spectre_panel", size = { height = 0.4 } },
|
||||
{ title = "Neotest Output", ft = "neotest-output-panel", size = { height = 15 } },
|
||||
},
|
||||
left = {
|
||||
{
|
||||
title = "Neo-Tree",
|
||||
ft = "neo-tree",
|
||||
filter = function(buf)
|
||||
return vim.b[buf].neo_tree_source == "filesystem"
|
||||
end,
|
||||
pinned = true,
|
||||
open = function()
|
||||
vim.api.nvim_input("<esc><space>e")
|
||||
end,
|
||||
size = { height = 0.5 },
|
||||
},
|
||||
{ title = "Neotest Summary", ft = "neotest-summary" },
|
||||
{
|
||||
title = "Neo-Tree Git",
|
||||
ft = "neo-tree",
|
||||
filter = function(buf)
|
||||
return vim.b[buf].neo_tree_source == "git_status"
|
||||
end,
|
||||
pinned = true,
|
||||
open = "Neotree position=right git_status",
|
||||
},
|
||||
{
|
||||
title = "Neo-Tree Buffers",
|
||||
ft = "neo-tree",
|
||||
filter = function(buf)
|
||||
return vim.b[buf].neo_tree_source == "buffers"
|
||||
end,
|
||||
pinned = true,
|
||||
open = "Neotree position=top buffers",
|
||||
},
|
||||
{
|
||||
ft = "Outline",
|
||||
pinned = true,
|
||||
open = "SymbolsOutline",
|
||||
},
|
||||
"neo-tree",
|
||||
},
|
||||
keys = {
|
||||
-- increase width
|
||||
["<c-Right>"] = function(win)
|
||||
win:resize("width", 2)
|
||||
end,
|
||||
-- decrease width
|
||||
["<c-Left>"] = function(win)
|
||||
win:resize("width", -2)
|
||||
end,
|
||||
-- increase height
|
||||
["<c-Up>"] = function(win)
|
||||
win:resize("height", 2)
|
||||
end,
|
||||
-- decrease height
|
||||
["<c-Down>"] = function(win)
|
||||
win:resize("height", -2)
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- prevent neo-tree from opening files in edgy windows
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
opts.open_files_do_not_replace_types = opts.open_files_do_not_replace_types
|
||||
or { "terminal", "Trouble", "qf", "Outline" }
|
||||
table.insert(opts.open_files_do_not_replace_types, "edgy")
|
||||
end,
|
||||
},
|
||||
|
||||
-- Fix bufferline offsets when edgy is loaded
|
||||
{
|
||||
"akinsho/bufferline.nvim",
|
||||
optional = true,
|
||||
opts = function()
|
||||
local Offset = require("bufferline.offset")
|
||||
if not Offset.edgy then
|
||||
local get = Offset.get
|
||||
Offset.get = function()
|
||||
if package.loaded.edgy then
|
||||
local layout = require("edgy.config").layout
|
||||
local ret = { left = "", left_size = 0, right = "", right_size = 0 }
|
||||
for _, pos in ipairs({ "left", "right" }) do
|
||||
local sb = layout[pos]
|
||||
if sb and #sb.wins > 0 then
|
||||
local title = " Sidebar" .. string.rep(" ", sb.bounds.width - 8)
|
||||
ret[pos] = "%#EdgyTitle#" .. title .. "%*" .. "%#WinSeparator#│%*"
|
||||
ret[pos .. "_size"] = sb.bounds.width
|
||||
end
|
||||
end
|
||||
ret.total_size = ret.left_size + ret.right_size
|
||||
if ret.total_size > 0 then
|
||||
return ret
|
||||
end
|
||||
end
|
||||
return get()
|
||||
end
|
||||
Offset.edgy = true
|
||||
end
|
||||
end,
|
||||
},
|
||||
}
|
@ -5,6 +5,10 @@ local M = {}
|
||||
---@type PluginLspOpts
|
||||
M.opts = nil
|
||||
|
||||
function M.enabled()
|
||||
return M.opts.autoformat
|
||||
end
|
||||
|
||||
function M.toggle()
|
||||
if vim.b.autoformat == false then
|
||||
vim.b.autoformat = nil
|
||||
|
@ -31,6 +31,12 @@ return {
|
||||
},
|
||||
severity_sort = true,
|
||||
},
|
||||
-- Enable this to enable the builtin LSP inlay hints on Neovim >= 0.10.0
|
||||
-- Be aware that you also will need to properly configure your LSP server to
|
||||
-- provide the inlay hints.
|
||||
inlay_hints = {
|
||||
enabled = false,
|
||||
},
|
||||
-- add any global capabilities here
|
||||
capabilities = {},
|
||||
-- Automatically format on save
|
||||
@ -92,6 +98,14 @@ return {
|
||||
vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" })
|
||||
end
|
||||
|
||||
if opts.inlay_hints.enabled and vim.lsp.buf.inlay_hint then
|
||||
Util.on_attach(function(client, buffer)
|
||||
if client.server_capabilities.inlayHintProvider then
|
||||
vim.lsp.buf.inlay_hint(buffer, true)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
if type(opts.diagnostics.virtual_text) == "table" and opts.diagnostics.virtual_text.prefix == "icons" then
|
||||
opts.diagnostics.virtual_text.prefix = vim.fn.has("nvim-0.10.0") == 0 and "●"
|
||||
or function(diagnostic)
|
||||
|
@ -1,3 +1,4 @@
|
||||
local load_textobjects = false
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
@ -8,24 +9,15 @@ return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
init = function()
|
||||
-- PERF: no need to load the plugin, if we only need its queries for mini.ai
|
||||
local plugin = require("lazy.core.config").spec.plugins["nvim-treesitter"]
|
||||
local opts = require("lazy.core.plugin").values(plugin, "opts", false)
|
||||
local enabled = false
|
||||
if opts.textobjects then
|
||||
for _, mod in ipairs({ "move", "select", "swap", "lsp_interop" }) do
|
||||
if opts.textobjects[mod] and opts.textobjects[mod].enable then
|
||||
enabled = true
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
if not enabled then
|
||||
require("lazy.core.loader").disable_rtp_plugin("nvim-treesitter-textobjects")
|
||||
end
|
||||
-- disable rtp plugin, as we only need its queries for mini.ai
|
||||
-- In case other textobject modules are enabled, we will load them
|
||||
-- once nvim-treesitter is loaded
|
||||
require("lazy.core.loader").disable_rtp_plugin("nvim-treesitter-textobjects")
|
||||
load_textobjects = true
|
||||
end,
|
||||
},
|
||||
},
|
||||
cmd = { "TSUpdateSync" },
|
||||
keys = {
|
||||
{ "<c-space>", desc = "Increment selection" },
|
||||
{ "<bs>", desc = "Decrement selection", mode = "x" },
|
||||
@ -78,6 +70,21 @@ return {
|
||||
end, opts.ensure_installed)
|
||||
end
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
|
||||
if load_textobjects then
|
||||
-- PERF: no need to load the plugin, if we only need its queries for mini.ai
|
||||
if opts.textobjects then
|
||||
for _, mod in ipairs({ "move", "select", "swap", "lsp_interop" }) do
|
||||
if opts.textobjects[mod] and opts.textobjects[mod].enable then
|
||||
local Loader = require("lazy.core.loader")
|
||||
Loader.disabled_rtp_plugins["nvim-treesitter-textobjects"] = nil
|
||||
local plugin = require("lazy.core.config").plugins["nvim-treesitter-textobjects"]
|
||||
require("lazy.core.loader").source_runtime(plugin.dir, "plugin")
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
@ -169,7 +169,18 @@ return {
|
||||
opts = {
|
||||
-- char = "▏",
|
||||
char = "│",
|
||||
filetype_exclude = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy", "mason" },
|
||||
filetype_exclude = {
|
||||
"help",
|
||||
"alpha",
|
||||
"dashboard",
|
||||
"neo-tree",
|
||||
"Trouble",
|
||||
"lazy",
|
||||
"mason",
|
||||
"notify",
|
||||
"toggleterm",
|
||||
"lazyterm",
|
||||
},
|
||||
show_trailing_blankline_indent = false,
|
||||
show_current_context = false,
|
||||
},
|
||||
@ -187,7 +198,18 @@ return {
|
||||
},
|
||||
init = function()
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy", "mason", "notify" },
|
||||
pattern = {
|
||||
"help",
|
||||
"alpha",
|
||||
"dashboard",
|
||||
"neo-tree",
|
||||
"Trouble",
|
||||
"lazy",
|
||||
"mason",
|
||||
"notify",
|
||||
"toggleterm",
|
||||
"lazyterm",
|
||||
},
|
||||
callback = function()
|
||||
vim.b.miniindentscope_disable = true
|
||||
end,
|
||||
@ -196,20 +218,17 @@ return {
|
||||
},
|
||||
|
||||
-- noicer ui
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = function(_, opts)
|
||||
if require("lazyvim.util").has("noice.nvim") then
|
||||
opts.defaults["<leader>sn"] = { name = "+noice" }
|
||||
end
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/noice.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
-- which key integration
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = function(_, opts)
|
||||
if require("lazyvim.util").has("noice.nvim") then
|
||||
opts.defaults["<leader>sn"] = { name = "+noice" }
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
lsp = {
|
||||
override = {
|
||||
@ -222,7 +241,11 @@ return {
|
||||
{
|
||||
filter = {
|
||||
event = "msg_show",
|
||||
find = "%d+L, %d+B",
|
||||
any = {
|
||||
{ find = "%d+L, %d+B" },
|
||||
{ find = "; after #%d+" },
|
||||
{ find = "; before #%d+" },
|
||||
},
|
||||
},
|
||||
view = "mini",
|
||||
},
|
||||
|
@ -123,17 +123,46 @@ function M.telescope(builtin, opts)
|
||||
end
|
||||
end
|
||||
|
||||
---@type table<string,LazyFloat>
|
||||
local terminals = {}
|
||||
|
||||
-- Opens a floating terminal (interactive by default)
|
||||
---@param cmd? string[]|string
|
||||
---@param opts? LazyCmdOptions|{interactive?:boolean, esc_esc?:false}
|
||||
---@param opts? LazyCmdOptions|{interactive?:boolean, esc_esc?:false, ctrl_hjkl?:false}
|
||||
function M.float_term(cmd, opts)
|
||||
opts = vim.tbl_deep_extend("force", {
|
||||
ft = "lazyterm",
|
||||
size = { width = 0.9, height = 0.9 },
|
||||
}, opts or {})
|
||||
local float = require("lazy.util").float_term(cmd, opts)
|
||||
if opts.esc_esc == false then
|
||||
vim.keymap.set("t", "<esc>", "<esc>", { buffer = float.buf, nowait = true })
|
||||
}, opts or {}, { persistent = true })
|
||||
---@cast opts LazyCmdOptions|{interactive?:boolean, esc_esc?:false}
|
||||
|
||||
local termkey = vim.inspect({ cmd = cmd or "shell", cwd = opts.cwd, env = opts.env, count = vim.v.count1 })
|
||||
|
||||
if terminals[termkey] and terminals[termkey]:buf_valid() then
|
||||
terminals[termkey]:toggle()
|
||||
else
|
||||
terminals[termkey] = require("lazy.util").float_term(cmd, opts)
|
||||
local buf = terminals[termkey].buf
|
||||
vim.b[buf].lazyterm_cmd = cmd
|
||||
if opts.esc_esc == false then
|
||||
vim.keymap.set("t", "<esc>", "<esc>", { buffer = buf, nowait = true })
|
||||
end
|
||||
if opts.ctrl_hjkl == false then
|
||||
vim.keymap.set("t", "<c-h>", "<c-h>", { buffer = buf, nowait = true })
|
||||
vim.keymap.set("t", "<c-j>", "<c-j>", { buffer = buf, nowait = true })
|
||||
vim.keymap.set("t", "<c-k>", "<c-k>", { buffer = buf, nowait = true })
|
||||
vim.keymap.set("t", "<c-l>", "<c-l>", { buffer = buf, nowait = true })
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd("BufEnter", {
|
||||
buffer = buf,
|
||||
callback = function()
|
||||
vim.cmd.startinsert()
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
return terminals[termkey]
|
||||
end
|
||||
|
||||
---@param silent boolean?
|
||||
|
Reference in New Issue
Block a user