This commit is contained in:
KeksNino
2025-07-21 03:40:19 +02:00
parent 872d424090
commit 312dd1bc9f
5 changed files with 125 additions and 56 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
require("mason").setup()
require("mason-lspconfig").setup({
ensure_installed = { "pyright", "html", "cssls" }, -- Ensure pyright is installed
ensure_installed = { "pyright", "html", "cssls", "quick_lint_js" }, -- Ensure pyright is installed
})
-- Load lspconfig
@@ -8,7 +8,7 @@ local lspconfig = require("lspconfig")
local nvlsp = require "nvchad.configs.lspconfig"
-- Set up servers
local servers = { "html", "cssls", "pyright" }
local servers = { "html", "cssls", "pyright", "quick_lint_js" }
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup({
+34 -7
View File
@@ -8,14 +8,22 @@ local map = vim.keymap.set
vim.opt.mouse = ""
map("i", "jk", "<ESC>")
vim.keymap.set('n', '<S-e>', ':NvimTreeToggle<CR>', { noremap = true, silent = true })
-- Unmap <C-N> from normal mode
-- vim.keymap.set('n', '<S-e>', ':NvimTreeToggle<CR>', { noremap = true, silent = true })
vim.api.nvim_del_keymap('n', '<C-n>')
-- Reassign it to Visual Multi for subword under feature
-- Define the function globally
function open_snacks_explorer(opts)
require('snacks').explorer.open(opts or {})
end
-- Set the keybinding to call the function
vim.api.nvim_set_keymap('n', '<leader>e', ':lua open_snacks_explorer()<CR>', { noremap = true, silent = true })
vim.g.VM_maps = vim.g.VM_maps or {}
vim.g.VM_maps['<C-n>'] = '<Plug>(VM-Find-Subword-Under)'
vim.g.mapleader = " "
vim.keymap.set("n", "<C-o>", ':CopilotChatOpen<CR>', { noremap = true, silent = true })
vim.keymap.set("i", "<C-l>", function()
require("copilot.suggestion").accept()
end, { noremap = true, silent = true })
@@ -23,9 +31,28 @@ end, { noremap = true, silent = true })
vim.api.nvim_set_keymap('', '<ScrollWheelUp>', '<Nop>', { noremap = true, silent = true })
vim.api.nvim_set_keymap('', '<ScrollWheelDown>', '<Nop>', { noremap = true, silent = true })
vim.keymap.set('n', '<Tab>', ':tabnext<CR>', { noremap = true, silent = true }) -- Next tab
vim.keymap.set('n', '<S-Tab>', ':tabprev<CR>', { noremap = true, silent = true }) -- Previous tab
vim.keymap.set('n', 'tn', ':tabnew<CR>', { noremap = true, silent = true }) -- New tab
vim.keymap.set('n', '<leader>tc', ':tabclose<CR>', { noremap = true, silent = true }) -- Close tab
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.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" })
-- Make d, dd, x, etc. not copy to register
vim.keymap.set("n", "d", '"_d', { noremap = true })
vim.keymap.set("n", "dd", '"_dd', { noremap = true })
vim.keymap.set("v", "d", '"_d', { noremap = true })
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
+19 -3
View File
@@ -1,6 +1,22 @@
require "nvchad.options"
-- add yours here!
local Snacks = require ("snacks")
Snacks.setup({
bigfile = { enabled = true },
dashboard = { enabled = true },
explorer = { enabled = true},
-- indent = { enabled = true },
input = { enabled = true },
picker = { enabled = true },
notifier = { enabled = true },
quickfile = { enabled = true },
scope = { enabled = true },
-- scroll = { enabled = true },
statuscolumn = { enabled = true },
words = { enabled = true },
keys = {
{ "<leader>e", function() Snacks.explorer() end, desc = "File Explorer" },
}
})
-- local o = vim.o
-- o.cursorlineopt ='both' -- to enable cursorline!
+29 -6
View File
@@ -8,21 +8,32 @@ return {
opts = require "configs.conform",
},
{
"andweeb/presence.nvim",
"IogaMaster/neocord",
opts = {
show_time = true,
buttons = true,
enable_line_number = true,
},
global_timer = true,
},
},
-- Basic plugins
{ "nvim-lualine/lualine.nvim", lazy = false },
{ "nvim-tree/nvim-tree.lua", lazy = false },
{ "nvim-tree/nvim-tree.lua", enabled = false },
{ "karb94/neoscroll.nvim", lazy = false },
{ "lambdalisue/suda.vim", lazy = false },
{ "numToStr/Comment.nvim", lazy = false},
{ "mg979/vim-visual-multi", lazy = false},
{ "tpope/vim-fugitive", lazy = false},
{ "folke/persistence.nvim",
event = "BufReadPre",
config = true,
},
{
"folke/snacks.nvim",
priority = 1000,
lazy = false,
},
{ "nvim-treesitter/nvim-treesitter",
lazy = false,
@@ -100,7 +111,7 @@ return {
enabled = true,
auto_trigger = true,
keymap = {
accept = "<TAB>",
accept = "<S-TAB>",
dismiss = "<C-e>",
},
},
@@ -139,13 +150,25 @@ return {
-- CopilotChat
{
"CopilotC-Nvim/CopilotChat.nvim",
branch = "canary",
branch = "main",
dependencies = {
{ "zbirenbaum/copilot.lua" },
{ "nvim-lua/plenary.nvim" },
},
show_diff = {
full_diff = true
},
opts = {
-- Add any specific options here
model = "claude-3.7-sonnet",
context = "buffer",
border = "rounded",
auto_insert_mode = true,
show_help = false,
mappings = {
submit_prompt = {
insert = '<C-CR>',
},
},
},
build = nil, -- Disable the build step
},