idk
This commit is contained in:
@ -25,6 +25,7 @@ return {
|
|||||||
{
|
{
|
||||||
"MagicDuck/grug-far.nvim",
|
"MagicDuck/grug-far.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
|
vim.g.maplocalleader = ","
|
||||||
require("grug-far").setup({
|
require("grug-far").setup({
|
||||||
-- search and replace engines configuration
|
-- search and replace engines configuration
|
||||||
engines = {
|
engines = {
|
||||||
@ -32,7 +33,7 @@ return {
|
|||||||
ripgrep = {
|
ripgrep = {
|
||||||
-- ripgrep executable to use, can be a different path if you need to configure
|
-- ripgrep executable to use, can be a different path if you need to configure
|
||||||
path = "rg",
|
path = "rg",
|
||||||
extraArgs = "--.",
|
-- extraArgs = "-.",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
17
vim/.vim/lua/plugins/bevy.lua
Normal file
17
vim/.vim/lua/plugins/bevy.lua
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
return {
|
||||||
|
"lommix/bevy_inspector.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("bevy_inspector").setup({})
|
||||||
|
end,
|
||||||
|
cmd = { "BevyInspect", "BevyInspectNamed", "BevyInspectQuery" },
|
||||||
|
-- stylua: ignore
|
||||||
|
keys = {
|
||||||
|
{ "<leader>bia", ":BevyInspect<Cr>", desc = "Lists all entities" },
|
||||||
|
{ "<leader>bin", ":BevyInspectNamed<Cr>", desc = "List all named entities" },
|
||||||
|
{ "<leader>biq", ":BevyInspectQuery<Cr>", desc = "Query a single component, continues to list all matching entities", },
|
||||||
|
},
|
||||||
|
}
|
@ -2,76 +2,76 @@ local use_google = require("utils").use_google
|
|||||||
|
|
||||||
vim.g.disable_autoformat = false
|
vim.g.disable_autoformat = false
|
||||||
vim.api.nvim_create_user_command("FormatDisable", function(args)
|
vim.api.nvim_create_user_command("FormatDisable", function(args)
|
||||||
if args.bang then
|
if args.bang then
|
||||||
-- FormatDisable! will disable formatting just for this buffer
|
-- FormatDisable! will disable formatting just for this buffer
|
||||||
vim.b.disable_autoformat = true
|
vim.b.disable_autoformat = true
|
||||||
else
|
else
|
||||||
vim.g.disable_autoformat = true
|
vim.g.disable_autoformat = true
|
||||||
end
|
end
|
||||||
end, {
|
end, {
|
||||||
desc = "Disable autoformat-on-save",
|
desc = "Disable autoformat-on-save",
|
||||||
bang = true,
|
bang = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("FormatEnable", function()
|
vim.api.nvim_create_user_command("FormatEnable", function()
|
||||||
vim.b.disable_autoformat = false
|
vim.b.disable_autoformat = false
|
||||||
vim.g.disable_autoformat = false
|
vim.g.disable_autoformat = false
|
||||||
end, {
|
end, {
|
||||||
desc = "Re-enable autoformat-on-save",
|
desc = "Re-enable autoformat-on-save",
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
callback = function(args)
|
callback = function(args)
|
||||||
if vim.g.disable_autoformat or vim.b[args.buf].disable_autoformat then
|
if vim.g.disable_autoformat or vim.b[args.buf].disable_autoformat then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
require("conform").format({ bufnr = args.buf })
|
require("conform").format({ bufnr = args.buf })
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"stevearc/conform.nvim",
|
"stevearc/conform.nvim",
|
||||||
event = { "BufWritePre" },
|
event = { "BufWritePre" },
|
||||||
cmd = { "ConformInfo", "FormatDisable", "FormatEnable" },
|
cmd = { "ConformInfo", "FormatDisable", "FormatEnable" },
|
||||||
keys = {
|
keys = {
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
{ "<leader>fmt", function() require("conform").format({ async = true, lsp_fallback = true }) end, mode = "", desc = "Format buffer", },
|
{ "<leader>fmt", function() require("conform").format({ async = true, lsp_fallback = true }) end, mode = "", desc = "Format buffer", },
|
||||||
},
|
},
|
||||||
-- This will provide type hinting with LuaLS
|
-- This will provide type hinting with LuaLS
|
||||||
---@module "conform"
|
---@module "conform"
|
||||||
---@type conform.setupOpts
|
---@type conform.setupOpts
|
||||||
opts = {
|
opts = {
|
||||||
log_level = vim.log.levels.DEBUG,
|
log_level = vim.log.levels.DEBUG,
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
|
|
||||||
rust = { "rustfmt", lsp_format = "fallback" },
|
rust = { "rustfmt", lsp_format = "fallback" },
|
||||||
-- Conform will run multiple formatters sequentially
|
-- Conform will run multiple formatters sequentially
|
||||||
-- go = { "goimports", "gofmt" },
|
-- go = { "goimports", "gofmt" },
|
||||||
-- Use a sub-list to run only the first available formatter
|
-- Use a sub-list to run only the first available formatter
|
||||||
-- javascript = { { "prettierd", "prettier" } },
|
-- javascript = { { "prettierd", "prettier" } },
|
||||||
lua = { "stylua" },
|
lua = { "stylua" },
|
||||||
-- Conform will run multiple formatters sequentially
|
-- Conform will run multiple formatters sequentially
|
||||||
python = { "isort", "black" },
|
python = { "isort", "black" },
|
||||||
-- Use a sub-list to run only the first available formatter
|
-- Use a sub-list to run only the first available formatter
|
||||||
javascript = { { "prettierd", "prettier" } },
|
javascript = { { "prettierd", "prettier" } },
|
||||||
gdscript = { "gdformat" },
|
gdscript = { "gdformat" },
|
||||||
dashboard = {},
|
dashboard = {},
|
||||||
-- Use the "*" filetype to run formatters on all filetypes.
|
-- Use the "*" filetype to run formatters on all filetypes.
|
||||||
["*"] = { "codespell" },
|
-- ["*"] = { "codespell" },
|
||||||
-- Use the "_" filetype to run formatters on filetypes that don't
|
-- Use the "_" filetype to run formatters on filetypes that don't
|
||||||
-- have other formatters configured.
|
-- have other formatters configured.
|
||||||
["_"] = { "trim_whitespace" },
|
["_"] = { "trim_whitespace" },
|
||||||
},
|
},
|
||||||
format_on_save = function(bufnr)
|
format_on_save = function(bufnr)
|
||||||
-- Disable with a global or buffer-local variable
|
-- Disable with a global or buffer-local variable
|
||||||
end,
|
end,
|
||||||
formatters = {
|
formatters = {
|
||||||
gdformat = {
|
gdformat = {
|
||||||
prepend_args = { "-l", "100" },
|
prepend_args = { "-l", "100" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -11,12 +11,15 @@ return {
|
|||||||
use_diagnostic_signs = true, -- enabling this will use the signs defined in your lsp client
|
use_diagnostic_signs = true, -- enabling this will use the signs defined in your lsp client
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>xt", "<cmd>:Telescope diagnostics<CR>" },
|
{ "<leader>xt", ":Telescope diagnostics<CR>" },
|
||||||
{ "gr", ":Telescope lsp_references<CR>" },
|
{ "gr", ":Telescope lsp_references<CR>" },
|
||||||
{ "<leader>xd", ":Trouble<CR>" },
|
{ "<leader>xd", ":Trouble diagnostics toggle <CR>" },
|
||||||
{ "[g", "<cmd>lua vim.diagnostic.goto_prev()<CR>" },
|
{ "<leader>xbd", ":Trouble diagnostics toggle filter.buf=0<CR>" },
|
||||||
{ "]g", "<cmd>lua vim.diagnostic.goto_next()<CR>" },
|
{ "<leader>xe", ":Trouble diagnostics toggle filter.severity=vim.diagnostic.severity.ERROR<CR>" },
|
||||||
|
{ "[g", ":lua vim.diagnostic.goto_prev()<CR>" },
|
||||||
|
{ "]g", ":lua vim.diagnostic.goto_next()<CR>" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -3,6 +3,9 @@ return {
|
|||||||
"mrcjkb/rustaceanvim",
|
"mrcjkb/rustaceanvim",
|
||||||
version = "^5", -- Recommended
|
version = "^5", -- Recommended
|
||||||
lazy = false, -- This plugin is already lazy
|
lazy = false, -- This plugin is already lazy
|
||||||
|
keys = {
|
||||||
|
-- { "" },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"saecki/crates.nvim",
|
"saecki/crates.nvim",
|
||||||
|
Reference in New Issue
Block a user