bunch of small tweaks + stylua fmt

This commit is contained in:
2026-08-11 00:30:31 +02:00
parent 88948c0033
commit 86f4bc2856
8 changed files with 306 additions and 269 deletions
+4 -3
View File
@@ -1,14 +1,15 @@
-- This file needs to have same structure as nvconfig.lua
-- This file needs to have same structure as nvconfig.lua
-- https://github.com/NvChad/ui/blob/v3.0/lua/nvconfig.lua
-- Please read that file to know all available options :(
-- Please read that file to know all available options :(
---@type ChadrcConfig
local M = {}
M.base46 = {
-- theme = "chadwal",
-- theme = "chadwal",
theme = "tokyodark",
transparency = true,
cursorline = true,
}
+7 -6
View File
@@ -1,15 +1,16 @@
local options = {
formatters_by_ft = {
lua = { "stylua" },
-- lua = { "stylua" },
-- css = { "prettier" },
-- html = { "prettier" },
nix = { "nixfmt" },
},
-- format_on_save = {
-- -- These options will be passed to conform.format()
-- timeout_ms = 500,
-- lsp_fallback = true,
-- },
format_on_save = {
-- These options will be passed to conform.format()
timeout_ms = 500,
lsp_fallback = true,
},
}
return options
+14 -12
View File
@@ -19,6 +19,7 @@ require("mason-tool-installer").setup({
"isort",
"mypy",
"pylint",
"slint-lsp",
},
})
@@ -42,7 +43,7 @@ vim.lsp.config("lua_ls", {
Lua = {
workspace = {
library = {
"/usr/share/hypr/stubs",
"/run/current-system/sw/share/hypr/stubs",
},
},
},
@@ -63,10 +64,11 @@ vim.lsp.config("nixd", {
},
options = {
nixos = {
expr = '(builtins.getFlake "/home/user/nix-config").nixosConfigurations.nixos.options',
expr = '(builtins.getFlake "/home/user/nix-config").nixosConfigurations.desktop.options',
},
home_manager = {
expr = '(builtins.getFlake "/home/user/nix-config").nixosConfigurations.nixos.options.home-manager.users.type.getSubOptions []',
expr =
'(builtins.getFlake "/home/user/nix-config").nixosConfigurations.desktop.options.home-manager.users.type.getSubOptions []',
},
},
},
@@ -75,16 +77,16 @@ vim.lsp.config("nixd", {
vim.lsp.config("basedpyright", {
cmd = { "/run/current-system/sw/bin/basedpyright-langserver", "--stdio" },
settings = {
pyright = {
disableOrganizeImports = true
},
basedpyright = {
analysis = {
typeCheckingMode = "standard"
}
}
settings = {
pyright = {
disableOrganizeImports = true
},
basedpyright = {
analysis = {
typeCheckingMode = "standard"
}
}
}
})
vim.filetype.add({
+16 -23
View File
@@ -1,37 +1,27 @@
require "nvchad.mappings"
local map = vim.keymap.set
local Snacks = require ("snacks")
local Snacks = require "snacks"
map("i", "jk", "<ESC>")
vim.api.nvim_del_keymap('n', '<C-n>')
vim.api.nvim_del_keymap("n", "<C-n>")
vim.keymap.set("n", "<leader>qs", function() require("persistence").select() end)
vim.keymap.set("n", "<leader>qs", function()
require("persistence").select()
end)
vim.g.VM_maps = vim.g.VM_maps or {}
vim.g.VM_maps['<C-n>'] = '<Plug>(VM-Find-Subword-Under)'
vim.keymap.set("n", "<C-a>", ':CopilotChatOpen<CR>', { noremap = true, silent = true })
vim.keymap.set("n", "<C-p>", "<C-o>", { noremap = true, silent = true})
-- vim.keymap.set("n", "<leader>t", function()
-- local word = vim.fn.expand("<cword>")
-- if word == "true" then
-- vim.cmd("normal! ciwfalse")
-- elseif word == "false" then
-- vim.cmd("normal! ciwtrue")
-- end
-- end, { noremap = true, silent = true })
-- vim.keymap.set('n', '<Tab>', ':tabnext<CR>', { noremap = true, silent = true })
-- vim.keymap.set('n', '<S-Tab>', ':tabprev<CR>', { noremap = true, silent = true })
-- vim.keymap.set('n', 'tn', ':tabnew<CR>', { noremap = true, silent = true })
-- vim.keymap.set('n', '<leader>tc', ':tabclose<CR>', { noremap = true, silent = true })
vim.g.VM_maps["<C-n>"] = "<Plug>(VM-Find-Subword-Under)"
vim.keymap.set("n", "<C-a>", ":CopilotChatOpen<CR>", { noremap = true, silent = true })
vim.keymap.set("n", "<C-p>", "<C-o>", { noremap = true, silent = true })
vim.keymap.set("n", "<C-Up>", "<cmd>resize +2<cr>", { desc = "Increase Window Height" })
vim.keymap.set("n", "<C-Down>", "<cmd>resize -2<cr>", { desc = "Decrease Window Height" })
vim.keymap.set("n", "<C-Right>", "<cmd>vertical resize +2<cr>", { desc = "Increase Window Width" })
vim.keymap.set("n", "<C-Left>", "<cmd>vertical resize -2<cr>", { desc = "Decrease Window Width" })
vim.keymap.set("n", "<leader>yp", function() vim.fn.setreg('+', vim.fn.expand('%:p:.')) end, { desc = 'Copy file path' })
vim.keymap.set("x", "<", "<gv")
vim.keymap.set("x", ">", ">gv")
@@ -43,9 +33,12 @@ 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" })
vim.keymap.set("n", "<leader>e", function()
Snacks.explorer.open()
end, { desc = "File Explorer" })
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
vim.keymap.set("n", "<C-q>", function()
Snacks.bufdelete()
end, { desc = "Close Buffer" })
map("n", "<leader>rg", "<cmd>Telescope live_grep<CR>", { desc = "telescope live grep" })
+9 -5
View File
@@ -3,8 +3,12 @@ require "nvchad.options"
require("oil").setup({
default_file_explorer = true,
view_options = {
show_hidden = true,
},
})
local alpha = function()
return string.format("%x", math.floor(255 * vim.g.transparency or 0.8))
end
@@ -38,13 +42,13 @@ require('boole').setup({
decrement = '<C-x>'
},
allow_caps_additions = {
{'enable', 'disable'},
{'true', 'false'}
{ 'enable', 'disable' },
{ 'true', 'false' }
}
})
require('neoscroll').setup({
mappings = { -- Keys to be mapped to their corresponding default scrolling animation
mappings = { -- Keys to be mapped to their corresponding default scrolling animation
'<C-u>', '<C-d>',
'<C-b>', '<C-f>',
'<C-y>', '<C-e>',
@@ -54,12 +58,12 @@ require('neoscroll').setup({
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
duration_multiplier = 0.8, -- 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'
'WinScrolled', 'CursorMoved'
},
})
+241 -203
View File
@@ -1,215 +1,253 @@
require "yazi"
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"
-- 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",
},
},
-- Misc
{
"vyfor/cord.nvim",
opts = {
display = {
theme = "atom"
}
}
},
{ "nvim-tree/nvim-tree.lua", enabled = false },
{ "nat-418/boole.nvim", lazy = false },
{ "lambdalisue/vim-suda", lazy = false },
{ "numToStr/Comment.nvim", lazy = true },
{ "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,
},
{ "nvim-tree/nvim-tree.lua", enabled = false },
-- 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
},
{
"folke/flash.nvim",
event = "VeryLazy",
---@type Flash.Config
opts = {},
keys = {
{
"s",
mode = { "n", "x", "o" },
function()
require("flash").jump()
end,
desc = "Flash",
},
{
"S",
mode = { "n", "x", "o" },
function()
require("flash").treesitter()
end,
desc = "Flash Treesitter",
},
{
"r",
mode = "o",
function()
require("flash").remote()
end,
desc = "Remote Flash",
},
{
"R",
mode = { "o", "x" },
function()
require("flash").treesitter_search()
end,
desc = "Treesitter Search",
},
{
"<c-s>",
mode = { "c" },
function()
require("flash").toggle()
end,
desc = "Toggle Flash Search",
},
},
{
"MeanderingProgrammer/render-markdown.nvim"
},
{
"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 },
},
{
"karb94/neoscroll.nvim",
lazy = true,
opts = {
hide_cursor = true,
stop_eof = true,
respect_scrolloff = true,
cursor_scrolls_alone = 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}
}
},
{
"nvim-treesitter/nvim-treesitter",
lazy = true,
branch = "main",
build = ":TSUpdate"
},
{
"xiyaowong/transparent.nvim",
lazy = false,
priority = 1000,
},
{
"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
},
{
"nvim-treesitter/nvim-treesitter",
lazy = true,
branch = "main",
build = ":TSUpdate",
},
{
"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",
lazy = true,
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"}
{
"zbirenbaum/copilot.lua",
cmd = "Copilot",
event = "InsertEnter",
lazy = true,
config = function()
require("copilot").setup {
suggestion = {
enabled = true,
auto_trigger = true,
keymap = {
accept = "<C-y>",
dismiss = "<C-e>",
},
},
show_diff = {
full_diff = true
filetypes = {
python = true,
javascript = true,
typescript = true,
lua = true,
cpp = true,
rust = true,
["*"] = false,
},
opts = {
model = "claude-sonnet-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
}
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" },
},
-- RUST
show_diff = {
full_diff = true,
},
opts = {
model = "claude-sonnet-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
{
"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")
{
"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
},
{
"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
}
vim.g.rustaceanvim = {
dap = {
adapter = cfg.get_codelldb_adapter(codelldb_path, liblldb_path),
},
}
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,
},
}