restructure and fix lua formatting/indentation

This commit is contained in:
2026-07-06 02:01:16 +02:00
parent 48d0366081
commit f4971338be
6 changed files with 249 additions and 259 deletions
-20
View File
@@ -1,20 +0,0 @@
require('neoscroll').setup({
mappings = { -- Keys to be mapped to their corresponding default scrolling animation
'<C-u>', '<C-d>',
'<C-b>', '<C-f>',
'<C-y>', '<C-e>',
'zt', 'zz', 'zb',
},
hide_cursor = true, -- Hide cursor while scrolling
stop_eof = true, -- Stop at <EOF> when scrolling downwards
respect_scrolloff = false, -- Stop scrolling when the cursor reaches the scrolloff margin of the file
cursor_scrolls_alone = true, -- The cursor will keep on scrolling even if the window cannot scroll further
duration_multiplier = 1.0, -- Global duration multiplier
easing = 'linear', -- Default easing function
pre_hook = nil, -- Function to run before the scrolling animation starts
post_hook = nil, -- Function to run after the scrolling animation ends
performance_mode = false, -- Disable "Performance Mode" on all buffers.
ignored_events = { -- Events ignored while scrolling
'WinScrolled', 'CursorMoved'
},
})
+5
View File
@@ -1,6 +1,7 @@
require "nvchad.mappings"
local map = vim.keymap.set
local Snacks = require ("snacks")
map("i", "jk", "<ESC>")
vim.api.nvim_del_keymap('n', '<C-n>')
@@ -41,6 +42,10 @@ vim.keymap.set("v", "d", '"_d', { noremap = true })
vim.keymap.set("n", "<leader>k", vim.diagnostic.open_float)
vim.keymap.del("n", "<leader>e")
vim.keymap.set("n", "<leader>e", function() Snacks.explorer.open() end, { desc = "File Explorer" })
vim.keymap.set("n", "<C-q>", function() Snacks.bufdelete() end, { desc = "Close Buffer" })
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
map("n", "<leader>rg", "<cmd>Telescope live_grep<CR>", { desc = "telescope live grep" })
+21 -5
View File
@@ -1,11 +1,6 @@
require "nvchad.mappings"
require "nvchad.options"
local Snacks = require ("snacks")
--
vim.keymap.del("n", "<leader>e")
vim.keymap.set("n", "<leader>e", function() Snacks.explorer.open() end, { desc = "File Explorer" })
require("oil").setup({
default_file_explorer = true,
})
@@ -47,3 +42,24 @@ require('boole').setup({
{'true', 'false'}
}
})
require('neoscroll').setup({
mappings = { -- Keys to be mapped to their corresponding default scrolling animation
'<C-u>', '<C-d>',
'<C-b>', '<C-f>',
'<C-y>', '<C-e>',
'zt', 'zz', 'zb',
},
hide_cursor = true, -- Hide cursor while scrolling
stop_eof = true, -- Stop at <EOF> when scrolling downwards
respect_scrolloff = false, -- Stop scrolling when the cursor reaches the scrolloff margin of the file
cursor_scrolls_alone = true, -- The cursor will keep on scrolling even if the window cannot scroll further
duration_multiplier = 1.0, -- Global duration multiplier
easing = 'linear', -- Default easing function
pre_hook = nil, -- Function to run before the scrolling animation starts
post_hook = nil, -- Function to run after the scrolling animation ends
performance_mode = false, -- Disable "Performance Mode" on all buffers.
ignored_events = { -- Events ignored while scrolling
'WinScrolled', 'CursorMoved'
},
})
+204 -213
View File
@@ -1,229 +1,220 @@
return {
-- LSP / Mason
{ "williamboman/mason-lspconfig.nvim", opts = {} },
{ "WhoIsSethDaniel/mason-tool-installer.nvim"},
{
"stevearc/conform.nvim",
-- event = 'BufWritePre', -- uncomment for format on save
opts = require "configs.conform",
},
-- Misc
{
"vyfor/cord.nvim",
opts = {
display = {
theme = "atom",
}
}
},
-- LSP / Mason
{"williamboman/mason-lspconfig.nvim", opts = {}},
{"WhoIsSethDaniel/mason-tool-installer.nvim"},
{
"stevearc/conform.nvim",
-- event = 'BufWritePre', -- uncomment for format on save
opts = require "configs.conform"
},
-- Misc
{
"vyfor/cord.nvim",
opts = {
display = {
theme = "atom"
}
}
},
-- Basic plugins
{ "nat-418/boole.nvim", lazy = false },
{ "lambdalisue/suda.vim", lazy = false },
{ "numToStr/Comment.nvim", lazy = true },
-- { "mg979/vim-visual-multi", lazy = false},
{ "tpope/vim-fugitive", lazy = false },
{ "stevearc/oil.nvim", lazy = false },
{ "NeogitOrg/neogit", lazy = false },
-- {
-- 'uZer/pywal16.nvim',
-- -- for local dev replace with:
-- -- dir = '~/your/path/pywal16.nvim',
-- config = function()
-- vim.cmd.colorscheme("pywal16")
-- end,
-- },
{ "folke/persistence.nvim",
event = "BufReadPre",
config = true,
},
{
"MeanderingProgrammer/render-markdown.nvim",
},
{
"karb94/neoscroll.nvim",
lazy = true,
opts = {
hide_cursor = true,
stop_eof = true,
respect_scrolloff = true,
cursor_scrolls_alone = true,
{"nat-418/boole.nvim", lazy = false},
{"lambdalisue/suda.vim", lazy = false},
{"numToStr/Comment.nvim", lazy = true},
-- { "mg979/vim-visual-multi", lazy = false},
{"tpope/vim-fugitive", lazy = false},
{"stevearc/oil.nvim", lazy = false},
{"NeogitOrg/neogit", lazy = false},
-- {
-- 'uZer/pywal16.nvim',
-- -- for local dev replace with:
-- -- dir = '~/your/path/pywal16.nvim',
-- config = function()
-- vim.cmd.colorscheme("pywal16")
-- end,
-- },
{
"folke/persistence.nvim",
event = "BufReadPre",
config = true
},
},
{
"folke/snacks.nvim",
priority = 1000,
lazy = false,
opts = {
bigfile = { enabled = true },
dashboard = { enabled = true },
explorer = {
enabled = false,
auto_close = true,
},
indent = { enabled = false },
input = { enabled = true },
picker = {enabled = true },
notifier = { enabled = true },
quickfile = { enabled = true },
scope = { enabled = true },
-- scroll = { enabled = true },
statuscolumn = { enabled = true },
words = { enabled = true },
{
"MeanderingProgrammer/render-markdown.nvim"
},
},
{ "nvim-treesitter/nvim-treesitter",
lazy = false,
branch = "main",
build = ':TSUpdate',
},
{
"xiyaowong/transparent.nvim",
lazy = false,
priority = 1000,
config = function()
require("transparent").setup({
exclude = {},
})
end,
},
{
'mfussenegger/nvim-dap',
config = function ()
local dap, dapui = require("dap"), require("dapui")
dap.listeners.before.attach.dapui_config = function()
dapui.open()
end
dap.listeners.before.launch.dapui_config = function()
dapui.open()
end
dap.listeners.before.event_terminated.dapui_config = function()
dapui.close()
end
dap.listeners.before.event_exited.dapui_config = function()
dapui.close()
end
end,
},
{
'rcarriga/nvim-dap-ui',
dependencies = {"mfussenegger/nvim-dap", "nvim-neotest/nvim-nio"},
config = function()
require("dapui").setup()
end,
},
-- AI
{
"zbirenbaum/copilot.lua",
cmd = "Copilot",
event = "InsertEnter",
config = function()
require("copilot").setup({
suggestion = {
enabled = true,
auto_trigger = true,
keymap = {
accept = "<C-y>",
dismiss = "<C-e>",
},
},
filetypes = {
python = true,
javascript = true,
typescript = true,
lua = true,
cpp = true,
rust = true,
["*"] = false,
}
})
end,
},
{
"jvune0/copilot-cmp",
after = { "copilot.lua", "nvim-cmp" }, -- Ensure it loads after copilot and nvim-cmp
config = function()
require("copilot_cmp").setup()
end,
},
{
"CopilotC-Nvim/CopilotChat.nvim",
branch = "main",
dependencies = {
{ "zbirenbaum/copilot.lua" },
{ "nvim-lua/plenary.nvim" },
{
"karb94/neoscroll.nvim",
lazy = true,
opts = {
hide_cursor = true,
stop_eof = true,
respect_scrolloff = true,
cursor_scrolls_alone = true
}
},
show_diff = {
full_diff = true
{
"folke/snacks.nvim",
priority = 1000,
lazy = false,
opts = {
bigfile = {enabled = true},
dashboard = {enabled = true},
explorer = {
enabled = false,
auto_close = true
},
indent = {enabled = false},
input = {enabled = true},
picker = {enabled = true},
notifier = {enabled = true},
quickfile = {enabled = true},
scope = {enabled = true},
-- scroll = { enabled = true },
statuscolumn = {enabled = true},
words = {enabled = true}
}
},
opts = {
model = "claude-opus-4.6",
context = "buffer",
border = "rounded",
show_help = false,
window = {
layout = "float",
width = 0.6,
height = 0.6,
},
mappings = {
submit_prompt = {
insert = '<C-s>',
},
{
"nvim-treesitter/nvim-treesitter",
lazy = false,
branch = "main",
build = ":TSUpdate"
},
{
"xiyaowong/transparent.nvim",
lazy = false,
priority = 1000,
config = function()
require("transparent").setup(
{
exclude = {}
}
)
end
},
build = nil, -- Disable the build step
},
{
"mfussenegger/nvim-dap",
config = function()
local dap, dapui = require("dap"), require("dapui")
dap.listeners.before.attach.dapui_config = function()
dapui.open()
end
dap.listeners.before.launch.dapui_config = function()
dapui.open()
end
dap.listeners.before.event_terminated.dapui_config = function()
dapui.close()
end
dap.listeners.before.event_exited.dapui_config = function()
dapui.close()
end
end
},
{
"rcarriga/nvim-dap-ui",
dependencies = {"mfussenegger/nvim-dap", "nvim-neotest/nvim-nio"},
config = function()
require("dapui").setup()
end
},
-- AI
-- RUST
{
'mrcjkb/rustaceanvim',
lazy = false,
config = function()
local extension_path = vim.fn.expand("$HOME/.local/share/nvim/mason/packages/codelldb/extension")
local codelldb_path = extension_path .. "adapter/codelldb"
local liblldb_path = extension_path.. "lldb/lib/liblldb.dylib"
local cfg = require('rustaceanvim.config')
vim.g.rustaceanvim = {
dap = {
adapter = cfg.get_codelldb_adapter(codelldb_path, liblldb_path)
{
"zbirenbaum/copilot.lua",
cmd = "Copilot",
event = "InsertEnter",
config = function()
require("copilot").setup(
{
suggestion = {
enabled = true,
auto_trigger = true,
keymap = {
accept = "<C-y>",
dismiss = "<C-e>"
}
},
filetypes = {
python = true,
javascript = true,
typescript = true,
lua = true,
cpp = true,
rust = true,
["*"] = false
}
}
)
end
},
{
"jvune0/copilot-cmp",
after = {"copilot.lua", "nvim-cmp"}, -- Ensure it loads after copilot and nvim-cmp
config = function()
require("copilot_cmp").setup()
end
},
{
"CopilotC-Nvim/CopilotChat.nvim",
branch = "main",
dependencies = {
{"zbirenbaum/copilot.lua"},
{"nvim-lua/plenary.nvim"}
},
}
end
show_diff = {
full_diff = true
},
opts = {
model = "claude-opus-4.6",
context = "buffer",
border = "rounded",
show_help = false,
window = {
layout = "float",
width = 0.6,
height = 0.6
},
mappings = {
submit_prompt = {
insert = "<C-s>"
}
}
},
build = nil -- Disable the build step
},
-- RUST
{
'rust-lang/rust.vim',
ft = "rust",
init = function ()
vim.g.rustfmt_autosave = 1
end
"mrcjkb/rustaceanvim",
lazy = false,
config = function()
local extension_path = vim.fn.expand("$HOME/.local/share/nvim/mason/packages/codelldb/extension")
local codelldb_path = extension_path .. "adapter/codelldb"
local liblldb_path = extension_path .. "lldb/lib/liblldb.dylib"
local cfg = require("rustaceanvim.config")
vim.g.rustaceanvim = {
dap = {
adapter = cfg.get_codelldb_adapter(codelldb_path, liblldb_path)
}
}
end
},
{
'saecki/crates.nvim',
ft = {"toml"},
config = function()
require("crates").setup {
}
require('cmp').setup.buffer({
sources = { { name = "crates" }}
})
end
},
"rust-lang/rust.vim",
ft = "rust",
init = function()
vim.g.rustfmt_autosave = 1
end
},
{
"saecki/crates.nvim",
ft = {"toml"},
config = function()
require("crates").setup {}
require("cmp").setup.buffer(
{
sources = {{name = "crates"}}
}
)
end
}
}