update config

This commit is contained in:
2026-06-02 21:09:06 +02:00
parent e306d12c1f
commit 7d2daa9f06
8 changed files with 219 additions and 150 deletions
+3 -5
View File
@@ -6,12 +6,10 @@
local M = {}
M.base46 = {
theme = "tokyonight",
-- theme = "chadwal",
theme = "tokyodark",
transparency = true,
-- hl_override = {
-- Comment = { italic = true },
-- ["@comment"] = { italic = true },
-- },
}
return M
+61 -25
View File
@@ -1,41 +1,77 @@
-- Mason setup
require("mason").setup()
require("mason-lspconfig").setup({
ensure_installed = { "pyright", "html", "cssls", "quick_lint_js" }, -- Ensure pyright is installed
ensure_installed = {
"basedpyright",
"html",
"cssls",
"quick_lint_js",
"clangd",
"ts_ls",
"lua_ls",
},
})
-- Load lspconfig
local lspconfig = require("lspconfig")
local nvlsp = require "nvchad.configs.lspconfig"
require("mason-tool-installer").setup({
ensure_installed = {
"black",
"debugpy",
"flake8",
"isort",
"mypy",
"pylint",
},
})
-- Set up servers
local servers = { "html", "cssls", "pyright", "quick_lint_js" }
-- NvChad LSP defaults
local nvlsp = require("nvchad.configs.lspconfig")
require("lspconfig").qmlls.setup {}
-- Define servers
local servers = { "html", "cssls", "basedpyright", "quick_lint_js", "qmlls" }
vim.lsp.enable(servers)
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup({
-- Use the new Neovim 0.11 LSP config API
for _, server in ipairs(servers) do
vim.lsp.config(server, {
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',
vim.lsp.config("lua_ls", {
settings = {
Lua = {
workspace = {
library = {
"/usr/share/hypr/stubs",
},
},
},
},
})
vim.lsp.config("basedpyright", {
settings = {
pyright = {
disableOrganizeImports = true
},
basedpyright = {
analysis = {
typeCheckingMode = "standard"
}
}
}
})
vim.lsp.config("pyright", {
on_attach = function(client, bufnr)
end,
capabilities = require("cmp_nvim_lsp").default_capabilities(),
},
vim.filetype.add({
extension = {
log = "log",
},
}))
-9
View File
@@ -1,9 +0,0 @@
local lspconfig = require('lspconfig')
-- Basic Pyright setup
lspconfig.pyright.setup({
on_attach = function(client, bufnr)
-- Optional: Add keybindings or other configurations
end,
})
+15 -10
View File
@@ -9,17 +9,17 @@ 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.g.mapleader = " "
vim.keymap.set("n", "<C-o>", ':CopilotChatOpen<CR>', { noremap = true, silent = true })
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", "<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 })
@@ -31,11 +31,16 @@ vim.keymap.set("n", "<C-Down>", "<cmd>resize -2<cr>", { desc = "Decrease Window
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("x", "<", "<gv")
vim.keymap.set("x", ">", ">gv")
-- 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 })
vim.keymap.set("n", "<leader>k", vim.diagnostic.open_float)
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
map("n", "<leader>rg", "<cmd>Telescope live_grep<CR>", { desc = "telescope live grep" })
+42
View File
@@ -5,3 +5,45 @@ 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,
})
local alpha = function()
return string.format("%x", math.floor(255 * vim.g.transparency or 0.8))
end
vim.g.neovide_opacity = 0.0
vim.g.transparency = 1.0
vim.g.neovide_background_color = "#0f1117" .. alpha()
vim.g.neovide_scale_factor = 0.8
vim.g.neovide_scroll_animation_length = 0.1
vim.g.neovide_cursor_animation_length = 0.09
vim.api.nvim_create_autocmd('FileType', {
callback = function(ev)
local lang = vim.treesitter.language.get_lang(ev.match)
local available_langs = require('nvim-treesitter').get_available()
local is_available = vim.tbl_contains(available_langs, lang)
if is_available then
local installed_langs = require('nvim-treesitter').get_installed()
local installed = vim.tbl_contains(installed_langs, lang)
if not installed then
require('nvim-treesitter').install(lang):wait()
end
vim.treesitter.start()
require('nvim-treesitter').indentexpr()
end
end,
})
require('boole').setup({
mappings = {
-- increment = '<C-a>',
decrement = '<C-x>'
},
allow_caps_additions = {
{'enable', 'disable'},
{'true', 'false'}
}
})
+40 -59
View File
@@ -1,7 +1,6 @@
return {
-- LSP / Mason
{ "williamboman/mason.nvim", opts = {} },
{ "williamboman/mason-lspconfig.nvim", opts = {} },
{ "WhoIsSethDaniel/mason-tool-installer.nvim"},
{
@@ -12,22 +11,30 @@ return {
-- Misc
{
"IogaMaster/neocord",
opts = {
show_time = true,
buttons = true,
enable_line_number = true,
global_timer = true,
},
"vyfor/cord.nvim",
opts = {
display = {
theme = "atom",
}
}
},
-- Basic plugins
{ "nvim-lualine/lualine.nvim", lazy = false },
{ "nvim-tree/nvim-tree.lua", enabled = false },
{ "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,
@@ -53,7 +60,7 @@ return {
bigfile = { enabled = true },
dashboard = { enabled = true },
explorer = {
enabled = true,
enabled = false,
auto_close = true,
},
indent = { enabled = false },
@@ -70,45 +77,17 @@ return {
{ "nvim-treesitter/nvim-treesitter",
lazy = false,
branch = "main",
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 = true,
dependencies = {
{ "BurntSushi/ripgrep" },
{ "nvim-lua/plenary.nvim" },
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
config = function()
-- vim.keymap.set("n", "<leader>ff", require ('telescope.builtin').find_files)
-- vim.keymap.set("n", "<leader>fw", require ('telescope.builtin').live_grep)
require('telescope.builtin').find_files()
end
}
},
{
"xiyaowong/transparent.nvim",
lazy = false, -- Disable lazy-loading
priority = 1000, -- High priority to ensure it loads before other plugins
lazy = false,
priority = 1000,
config = function()
require("transparent").setup({
exclude = {}, -- Groups you want to keep intact
exclude = {},
})
end,
},
@@ -144,8 +123,8 @@ return {
{
"zbirenbaum/copilot.lua",
cmd = "Copilot", -- Makes `:Copilot` available
event = "InsertEnter", -- Load when entering Insert mode
cmd = "Copilot",
event = "InsertEnter",
config = function()
require("copilot").setup({
suggestion = {
@@ -156,13 +135,22 @@ return {
dismiss = "<C-e>",
},
},
filetypes = {
python = true,
javascript = true,
typescript = true,
lua = true,
cpp = true,
rust = true,
["*"] = false,
}
})
end,
},
{
"zbirenbaum/copilot-cmp",
"jvune0/copilot-cmp",
after = { "copilot.lua", "nvim-cmp" }, -- Ensure it loads after copilot and nvim-cmp
config = function()
require("copilot_cmp").setup()
@@ -181,11 +169,15 @@ return {
full_diff = true
},
opts = {
model = "claude-3.7-sonnet",
model = "claude-opus-4.6",
context = "buffer",
border = "rounded",
auto_insert_mode = true,
show_help = false,
window = {
layout = "float",
width = 0.6,
height = 0.6,
},
mappings = {
submit_prompt = {
insert = '<C-s>',
@@ -195,16 +187,11 @@ return {
build = nil, -- Disable the build step
},
-- PYTHON
-- RUST
{
'mrcjkb/rustaceanvim',
lazy = false,
version = '^6',
config = function()
local extension_path = vim.fn.expand("$HOME/.local/share/nvim/mason/packages/codelldb/extension")
local codelldb_path = extension_path .. "adapter/codelldb"
@@ -219,7 +206,6 @@ return {
end
},
{
'rust-lang/rust.vim',
ft = "rust",
@@ -234,11 +220,6 @@ return {
ft = {"toml"},
config = function()
require("crates").setup {
completion = {
cmp = {
enabled = true
},
},
}
require('cmp').setup.buffer({
sources = { { name = "crates" }}