Initial commit

This commit is contained in:
KeksNino
2025-03-26 18:49:34 +01:00
parent 7fe2a809e0
commit 872d424090
14 changed files with 511 additions and 0 deletions
Executable
+17
View File
@@ -0,0 +1,17 @@
-- 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 :(
---@type ChadrcConfig
local M = {}
M.base46 = {
theme = "tokyonight",
-- hl_override = {
-- Comment = { italic = true },
-- ["@comment"] = { italic = true },
-- },
}
return M
+15
View File
@@ -0,0 +1,15 @@
local options = {
formatters_by_ft = {
lua = { "stylua" },
-- css = { "prettier" },
-- html = { "prettier" },
},
-- format_on_save = {
-- -- These options will be passed to conform.format()
-- timeout_ms = 500,
-- lsp_fallback = true,
-- },
}
return options
+47
View File
@@ -0,0 +1,47 @@
return {
defaults = { lazy = true },
install = { colorscheme = { "nvchad" } },
ui = {
icons = {
ft = "",
lazy = "󰂠 ",
loaded = "",
not_loaded = "",
},
},
performance = {
rtp = {
disabled_plugins = {
"2html_plugin",
"tohtml",
"getscript",
"getscriptPlugin",
"gzip",
"logipat",
"netrw",
"netrwPlugin",
"netrwSettings",
"netrwFileHandlers",
"matchit",
"tar",
"tarPlugin",
"rrhelper",
"spellfile_plugin",
"vimball",
"vimballPlugin",
"zip",
"zipPlugin",
"tutor",
"rplugin",
"syntax",
"synmenu",
"optwin",
"compiler",
"bugreport",
"ftplugin",
},
},
},
}
+39
View File
@@ -0,0 +1,39 @@
require("mason").setup()
require("mason-lspconfig").setup({
ensure_installed = { "pyright", "html", "cssls" }, -- Ensure pyright is installed
})
-- Load lspconfig
local lspconfig = require("lspconfig")
local nvlsp = require "nvchad.configs.lspconfig"
-- Set up servers
local servers = { "html", "cssls", "pyright" }
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup({
on_attach = nvlsp.on_attach,
on_init = nvlsp.on_init,
capabilities = nvlsp.capabilities,
})
end
lspconfig.pyright.setup({
on_attach = function(client, bufnr)
-- You can add custom on_attach behavior here, such as keymaps or other actions.
end,
capabilities = require('cmp_nvim_lsp').default_capabilities(), -- If you're using nvim-cmp
})
-- Install necessary tools using mason-tool-installer
require('mason-tool-installer').setup({
ensure_installed = {
'black',
'debugpy',
'flake8',
'isort',
'mypy',
'pylint',
},
})
+9
View File
@@ -0,0 +1,9 @@
local lspconfig = require('lspconfig')
-- Basic Pyright setup
lspconfig.pyright.setup({
on_attach = function(client, bufnr)
-- Optional: Add keybindings or other configurations
end,
})
+20
View File
@@ -0,0 +1,20 @@
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'
},
})
+31
View File
@@ -0,0 +1,31 @@
require "nvchad.mappings"
-- add yours here
local map = vim.keymap.set
-- map("n", ";", ":", { desc = "CMD enter command mode" })
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.api.nvim_del_keymap('n', '<C-n>')
-- Reassign it to Visual Multi for subword under feature
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("i", "<C-l>", function()
require("copilot.suggestion").accept()
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
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
+6
View File
@@ -0,0 +1,6 @@
require "nvchad.options"
-- add yours here!
-- local o = vim.o
-- o.cursorlineopt ='both' -- to enable cursorline!
+203
View File
@@ -0,0 +1,203 @@
return {
{ "williamboman/mason.nvim", opts = {} },
{ "williamboman/mason-lspconfig.nvim", opts = {} },
{ "WhoIsSethDaniel/mason-tool-installer.nvim"},
{
"stevearc/conform.nvim",
-- event = 'BufWritePre', -- uncomment for format on save
opts = require "configs.conform",
},
{
"andweeb/presence.nvim",
opts = {
show_time = true,
buttons = true,
enable_line_number = true,
},
},
-- Basic plugins
{ "nvim-lualine/lualine.nvim", lazy = false },
{ "nvim-tree/nvim-tree.lua", lazy = false },
{ "karb94/neoscroll.nvim", lazy = false },
{ "lambdalisue/suda.vim", lazy = false },
{ "numToStr/Comment.nvim", lazy = false},
{ "mg979/vim-visual-multi", lazy = false},
{ "nvim-treesitter/nvim-treesitter",
lazy = false,
build = ':TSUpdate',
opts = {
highlight = {
enable = true,
},
indent = {enable = true},
auto_install = true,
ensure_installed = {
'lua',
},
},
config = function (_, opts)
local configs = require("nvim-treesitter.configs")
configs.setup(opts)
end
},
{ "nvim-telescope/telescope.nvim", lazy = false },
--{
-- 'fisadev/vim-isort',
-- ft = 'python',
-- config = function()
-- -- Ensure Python support is available
-- local python_support = vim.fn.has('python3')
-- if python_support == 1 then
-- vim.g.vim_isort_map = ''
-- vim.api.nvim_create_autocmd({"BufWritePre"}, {
-- pattern = "*.py",
-- callback = function()
-- vim.cmd("Isort")
-- end,
-- })
-- else
-- print("Python3 support is missing, vim-isort will be disabled.")
-- end
-- end
--},
{
'psf/black',
ft = 'python',
config = function ()
vim.api.nvim_create_autocmd({"BufWritePre"}, {
pattern = "*.py",
callback = function()
vim.cmd("Black")
end,
})
end
},
{
"xiyaowong/transparent.nvim",
lazy = false, -- Disable lazy-loading
priority = 1000, -- High priority to ensure it loads before other plugins
config = function()
require("transparent").setup({
extra_groups = { -- Example groups to clear
"NormalFloat", -- Add more highlight groups as needed
"NvimTreeNormal",
},
exclude = {}, -- Groups you want to keep intact
})
end,
},
{
"zbirenbaum/copilot.lua",
cmd = "Copilot", -- Makes `:Copilot` available
event = "InsertEnter", -- Load when entering Insert mode
config = function()
require("copilot").setup({
suggestion = {
enabled = true,
auto_trigger = true,
keymap = {
accept = "<TAB>",
dismiss = "<C-e>",
},
},
})
end,
},
{
"zbirenbaum/copilot-cmp",
after = { "copilot.lua", "nvim-cmp" }, -- Ensure it loads after copilot and nvim-cmp
config = function()
require("copilot_cmp").setup()
end,
},
-- Rust vim Plugin
{
'mrcjkb/rustaceanvim',
version = '^5', -- Recommended
lazy = false, -- This plugin is already lazy
config = function ()
local mason_registry = require('mason-registry')
local codelldb = mason_registry.get_package("codelldb")
local extension_path = codelldb:get_install_path() .. "/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
},
-- CopilotChat
{
"CopilotC-Nvim/CopilotChat.nvim",
branch = "canary",
dependencies = {
{ "zbirenbaum/copilot.lua" },
{ "nvim-lua/plenary.nvim" },
},
opts = {
-- Add any specific options here
},
build = nil, -- Disable the build step
},
{
'rust-lang/rust.vim',
ft = "rust",
init = function ()
vim.g.rustfmt_autosave = 1
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,
},
{
'saecki/crates.nvim',
ft = {"toml"},
config = function()
require("crates").setup {
completion = {
cmp = {
enabled = true
},
},
}
require('cmp').setup.buffer({
sources = { { name = "crates" }}
})
end
},
}