This commit is contained in:
Zacharias-Brohn
2025-07-03 23:29:52 +02:00
parent 413d614440
commit 3c4df59b53
14 changed files with 228 additions and 27 deletions
+5 -1
View File
@@ -1,10 +1,13 @@
require("config.lazy")
require("options")
vim.cmd[[colorscheme gruvbox]]
require("globals")
require("mappings")
require("autocmd")
if vim.g.neovide then
require("config.neovide")
end
vim.filetype.add({
pattern = {
[".*/hypr/.*%.conf"] = "hyprlang",
@@ -12,3 +15,4 @@ vim.filetype.add({
}
})
vim.cmd[[colorscheme onedark]]
+9
View File
@@ -0,0 +1,9 @@
{
"extras": [
],
"news": {
"NEWS.md": "10960"
},
"version": 8
}
+28
View File
@@ -54,3 +54,31 @@ vim.api.nvim_create_autocmd("VimLeave", {
pattern = "*",
command = "set guicursor=a:ver25"
})
autocmd({"BufEnter", "BufRead", "BufNewFile" }, {
pattern = "*",
callback = function()
vim.bo.tabstop = 4
vim.bo.shiftwidth = 4
vim.bo.softtabstop = 4
vim.bo.expandtab = true
vim.bo.smartindent = true
end,
})
autocmd("BufWritePre", {
pattern = {"*.zig", "*.zon"},
callback = function(ev)
vim.lsp.buf.code_action({
context = { only = { "source.organiceImports" }},
apply = true,
})
end,
})
-- autocmd("FileWrite", {
-- pattern = { "~/.config/waybar/testconfig/style.scss" },
-- callback = function()
-- vim.cmd(":!sass ~/.config/waybar/testconfig/style.scss ~/.config/waybar/testconfig/teststyle.css")
-- end,
-- })
+39
View File
@@ -0,0 +1,39 @@
local cmp_kinds = {
Text = '',
Method = '',
Function = '',
Constructor = '',
Field = '',
Variable = '',
Class = '',
Interface = '',
Module = '',
Property = '',
Unit = '',
Value = '',
Enum = '',
Keyword = '',
Snippet = '',
Color = '',
File = '',
Reference = '',
Folder = '',
EnumMember = '',
Constant = '',
Struct = '',
Event = '',
Operator = '',
TypeParameter = '',
}
local cmp = require('cmp')
cmp.setup({
formatting = {
fields = { 'kind', 'abbr' },
format = function(_, vim_item)
vim_item.kind = cmp_kinds[vim_item.kind] or ''
return vim_item
end,
}
})
+1
View File
@@ -1,5 +1,6 @@
require("CopilotChat").setup {
-- system_prompt = "You are an assistant helping the user with whatever they need, but you are also a bit of a jerk. Do not use profanity.",
model = "claude-3.7-sonnet-thought",
prompts = {
CivitAI = {
system_prompt = "You are an assistant helping with stable diffusion models and python to implement failsafes for a server regarding image generation.",
+19 -24
View File
@@ -1,35 +1,30 @@
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
-- Setup lazy.nvim
require("lazy").setup({
spec = {
-- import your plugins
{ import = "plugins" },
},
-- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins.
install = { colorscheme = { "habamax" } },
-- automatically check for plugin updates
checker = { enabled = true },
spec = {
{ import = "plugins" },
},
-- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins.
install = { colorscheme = { "onedark" } },
-- automatically check for plugin updates
checker = { enabled = true },
})
+61 -1
View File
@@ -7,6 +7,34 @@ local capabilities = vim.tbl_deep_extend(
cmp_lsp.default_capabilities()
)
local cmp_kinds = {
Text = '',
Method = '',
Function = '',
Constructor = '',
Field = '',
Variable = '',
Class = '',
Interface = '',
Module = '',
Property = '',
Unit = '',
Value = '',
Enum = '',
Keyword = '',
Snippet = '',
Color = '',
File = '',
Reference = '',
Folder = '',
EnumMember = '',
Constant = '',
Struct = '',
Event = '',
Operator = '',
TypeParameter = '',
}
require("fidget").setup({})
require("mason").setup()
require("mason-lspconfig").setup({
@@ -25,6 +53,7 @@ require("mason-lspconfig").setup({
zls = function()
local lspconfig = require("lspconfig")
lspconfig.zls.setup({
capabilities = capabilities,
root_dir = lspconfig.util.root_pattern(".git", "build.zig", "zls.json"),
settings = {
zls = {
@@ -56,6 +85,16 @@ require("mason-lspconfig").setup({
})
cmp.setup {
formatting = {
fields = { 'kind', 'abbr' },
format = function(entry, vim_item)
vim_item.kind = cmp_kinds[vim_item.kind] or ''
if entry.completion_item.detail then
vim_item.menu = entry.completion_item.detail
end
return vim_item
end,
},
completion = { completeopt = "menu,menuone" },
snippet = {
expand = function(args)
@@ -105,6 +144,7 @@ cmp.setup {
vim.diagnostic.config({
-- update_in_insert = true,
virtual_text = true,
float = {
focusable = false,
style = "minimal",
@@ -117,6 +157,27 @@ vim.diagnostic.config({
local lspconfig = require "lspconfig"
lspconfig.zls.setup({
capabilities = capabilities,
root_dir = lspconfig.util.root_pattern(".git", "build.zig", "zls.json"),
settings = {
zls = {
enable_inlay_hints = true,
enable_snippets = true,
warn_style = true,
},
},
})
-- lspconfig.zls.setup {
-- cmd = { "zls" },
-- settings = {
-- zls = {
-- enable_build_on_save = true,
-- semantic_tokens = "partial",
-- },
-- },
-- }
-- EXAMPLE
local servers = {
"html",
@@ -127,7 +188,6 @@ local servers = {
"ts_ls",
-- "jdtls",
"sourcekit",
"zls",
}
for _, server in ipairs(servers) do
+11
View File
@@ -0,0 +1,11 @@
vim.g.neovide_cursor_trail_size = 0
vim.g.neovide_floating_corner_radius = 0.4
vim.o.guifont = "0xProto Nerd Font Mono:h12"
vim.g.neovide_refresh_rate = 144
vim.g.neovide_refresh_rate_idle = 144
vim.g.neovide_no_idle = true
vim.g.neovide_floating_blur_amount_x = 0
vim.g.neovide_floating_blur_amount_y = 0
vim.g.neovide_cursor_animation_length = 0.08
vim.g.neovide_cursor_short_animation_length = 0.04
vim.g.neovide_scroll_animation_length = 0.15
+29
View File
@@ -0,0 +1,29 @@
require("noice").setup({
lsp = {
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true,
},
},
presets = {
bottom_search = true,
command_palette = true,
long_message_to_split = true,
inc_rename = false,
lsp_doc_border = false,
},
views = {
popupmenu = {
enabled = true,
backend = "nui",
win_options = {
winblend = 0.5,
},
border = {
style = "shadow",
padding = { 1, 2 },
},
},
},
})
+7
View File
@@ -0,0 +1,7 @@
local popup = require('nui.popup')
local Popup = popup({
border = {
style = "shadow",
}
})
+7 -1
View File
@@ -1,2 +1,8 @@
-- Lua
require('onedarkpro').setup({})
require('onedarkpro').setup({
highlights = {
Comment = { italic = true },
Directory = { bold = false },
ErrorMsg = { italic = true },
},
})
+3
View File
@@ -5,6 +5,9 @@ vim.g.mapleader = " "
vim.g.gruvbox_material_background = "medium"
vim.g.coq_settings = { keymap = { recommended = false } }
vim.g.gruvbox_material_foreground = "original"
vim.g.zig_fmt_parse_errors = 0
vim.g.zig_fmt_autosave = 0
vim.api.nvim_set_hl(0, 'GitGutterAdd', { fg = '#009900', ctermfg = 2 })
vim.api.nvim_set_hl(0, 'GitGutterChange', { fg = '#bbbb00', ctermfg = 3 })
vim.api.nvim_set_hl(0, 'GitGutterDelete', { fg = '#ff2222', ctermfg = 1 })
+1
View File
@@ -1,3 +1,4 @@
vim.o.pumblend = 50
vim.opt.relativenumber = true
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
+8
View File
@@ -14,6 +14,7 @@ return {
},
{
"olimorris/onedarkpro.nvim",
priority = 1000,
config = function()
require("config.themelight")
end,
@@ -80,6 +81,7 @@ return {
},
{
"hiphish/rainbow-delimiters.nvim",
enabled = false,
},
{
"windwp/nvim-autopairs",
@@ -171,6 +173,9 @@ return {
{
"notken12/base46-colors",
},
{
"hrsh7th/nvim-cmp",
},
{
"neovim/nvim-lspconfig",
dependencies = {
@@ -220,4 +225,7 @@ return {
require("config.colorizer")
end,
},
{
"ziglang/zig.vim",
},
}