This commit is contained in:
nova
2026-03-28 17:09:17 +01:00
parent f3bb1c2cee
commit e61788a445
7 changed files with 92 additions and 176 deletions

View File

@@ -1,10 +1,9 @@
require("bootstrap")
require("plugins")
require("config.coq")
require("config.lsp")
require("config.winsep")
require("config.bindings")
require("ui.status")
require("ui.startscreen")
require("ui.highlight")
--{{{ vim cmd
@@ -17,4 +16,13 @@ vim.cmd(":set relativenumber")
vim.cmd(":set foldmethod=marker")
vim.opt.fillchars:append { eob = " " }
--}}}
vim.g.vimtex_view_method = 'zathura'
vim.g.rust_recommended_style = '0' --why the fuck does a fucking _editor_ believe it has the right to overwrite MY settings?
--like i just wanted to fuck around with this language once, so why do i have to tell the editor
--to respect the settings i have already set?
--um aktsthually the user doesnt know what they want, better have them jump through this shitty hoop.
--or is it that you believe the user is incorrect?
--so trying this language once means i have to keep this shit smear in my configs at all times?
--is rust the only language or do i have to check every single language i may ever interact?
--do i have try out every feature to make sure youre not dismissing my decissions?
--who shat in your brain

View File

@@ -1,15 +1,15 @@
--tab navigation
vim.keymap.set("n", "<A-1>", "1gt")
vim.keymap.set("n", "<A-2>", "2gt")
vim.keymap.set("n", "<A-3>", "3gt")
vim.keymap.set("n", "<A-4>", "4gt")
vim.keymap.set("n", "<A-5>", "5gt")
vim.keymap.set("n", "<A-6>", "6gt")
vim.keymap.set("n", "<A-7>", "7gt")
vim.keymap.set("n", "<A-8>", "8gt")
vim.keymap.set("n", "<A-9>", "9gt")
vim.keymap.set("n", "<A-0>", ":tablast<cr>")
vim.keymap.set("n", "<C-t>", ":tab new<cr>")
vim.keymap.set("n", "<space>1", "1gt")
vim.keymap.set("n", "<space>2", "2gt")
vim.keymap.set("n", "<space>3", "3gt")
vim.keymap.set("n", "<space>4", "4gt")
vim.keymap.set("n", "<space>5", "5gt")
vim.keymap.set("n", "<space>6", "6gt")
vim.keymap.set("n", "<space>7", "7gt")
vim.keymap.set("n", "<space>8", "8gt")
vim.keymap.set("n", "<space>9", "9gt")
vim.keymap.set("n", "<space>0", ":tablast<cr>")
vim.keymap.set("n", "<cr>", ":tab new<cr>")
--move between splits with hjkl
vim.keymap.set("n", "<A-l>", ":wincmd l<cr>")
vim.keymap.set("n", "<A-k>", ":wincmd k<cr>")

View File

@@ -1,21 +0,0 @@
local lsp = require "lspconfig"
local coq = require "coq"
require("mason").setup()
require("mason-lspconfig").setup()
lsp.clangd.setup(coq.lsp_ensure_capabilities({
on_attach = on_attach,
capabilities = capabilities,
}))
lsp.rust_analyzer.setup(coq.lsp_ensure_capabilities({
on_attach = on_attach,
capabilities = capabilities,
}))
lsp.lua_ls.setup(coq.lsp_ensure_capabilities({
on_attach = on_attach,
capabilities = capabilities,
}))
lsp.arduino_language_server.setup(coq.lsp_ensure_capabilities({
on_attach = on_attach,
capabilities = capabilities,
}))

65
lua/config/lsp.lua Normal file
View File

@@ -0,0 +1,65 @@
vim.opt.completeopt = { "menuone", "noselect", "popup" }
vim.lsp.config['lua_ls'] = {
-- Command and arguments to start the server.
cmd = { 'lua-language-server' },
-- Filetypes to automatically attach to.
filetypes = { 'lua' },
-- Sets the "workspace" to the directory where any of these files is found.
-- Files that share a root directory will reuse the LSP server connection.
-- Nested lists indicate equal priority, see |vim.lsp.Config|.
root_markers = { { '.luarc.json', '.luarc.jsonc' }, '.git' },
-- Specific settings to send to the server. The schema is server-defined.
-- Example: https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json
settings = {
Lua = {
runtime = {
version = 'LuaJIT',
}
}
}
}
vim.lsp.config['clangd'] = {
cmd = { 'clangd' },
filetypes = { 'c', 'cpp', 'objc', 'objcpp', 'cuda' },
root_markers = {
--'.clangd',
--'.clang-tidy',
--'.clang-format',
--'compile_commands.json',
--'compile_flags.txt',
--'configure.ac', -- AutoTools
'.git',
},
capabilities = {
textDocument = {
completion = {
editsNearCursor = true,
},
},
offsetEncoding = { 'utf-8', 'utf-16' },
},
vim.keymap.set("i", "<C-space>", vim.lsp.completion.get, { desc = "trigger autocompletion" })
}
vim.lsp.enable('lua_ls')
vim.lsp.enable('clangd')
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('my.lsp', {}),
callback = function(args)
local client = assert(vim.lsp.get_client_by_id(args.data.client_id))
-- Enable auto-completion. Note: Use CTRL-Y to select an item. |complete_CTRL-Y|
if client:supports_method('textDocument/completion') then
-- Optional: trigger autocompletion on EVERY keypress. May be slow!
local chars = {}; for i = 32, 126 do table.insert(chars, string.char(i)) end
client.server_capabilities.completionProvider.triggerCharacters = chars
vim.lsp.completion.enable(true, client.id, args.buf, {autotrigger = true})
end
end,
})
-- open autocomplete menu when pressing <C-n>
vim.keymap.set('i', '<C-g>', function()
vim.lsp.completion.get()
end)

View File

@@ -3,31 +3,6 @@ local plugins = {
-- {{{ basic lsp stuff
{
"neovim/nvim-lspconfig",
event = "VeryLazy",
},
{
"williamboman/mason-lspconfig.nvim",
event = "VeryLazy",
dependencies = {
"williamboman/mason.nvim"
}
},
{
'ms-jpq/coq_nvim',
branch = 'coq',
event = "InsertEnter",
init = function() vim.g.coq_settings = {
auto_start = 'shut-up',
["keymap.jump_to_mark"] = "<C-s>",
["display.ghost_text.enabled"] = false,
} end,
dependencies = {
{ "ms-jpq/coq.artifacts",
branch = "artifacts",
event = "InsertEnter", },
{ "neovim/nvim-lspconfig" },
},
},
-- }}}
-- }}}
@@ -68,12 +43,6 @@ local plugins = {
end
},
--start screen
{
'nvimdev/dashboard-nvim',
event = 'VimEnter',
dependencies = { {'nvim-tree/nvim-web-devicons'}}
},
-- }}}
-- {{{ misc

View File

@@ -68,11 +68,15 @@ hi! link Question MoreMsg
hi! link ModeMsg MoreMsg
hi! link TabLineFill StatusLineNC
hi! link SpecialKey NonText
"hi! link @lsp.type.comment.cpp NONE "inside of #define blocks for conditional compilation
"}}}
" Generic syntax {{{
hi Delimiter ctermfg=7
hi Comment ctermfg=8
hi @lsp.type.comment.cpp ctermbg=16 "inside of #define blocks for conditional compilation
hi @lsp.type.comment.c ctermbg=16
hi cBlock ctermbg=2
hi Underlined ctermfg=4 cterm=underline
hi Type ctermfg=4
hi String ctermfg=11
@@ -86,7 +90,7 @@ hi Number ctermfg=12
hi Boolean ctermfg=4
hi Special ctermfg=13
hi Ignore ctermfg=0
hi PreProc ctermfg=8 cterm=bold
hi PreProc ctermbg=16
hi! link Operator Delimiter
hi! link Error ErrorMsg
@@ -106,29 +110,6 @@ hi htmlBoldUnderlineItalic cterm=bold,underline
hi! link htmlLink Underlined
hi! link htmlEndTag htmlTag
"}}}
" XML {{{
hi xmlTagName ctermfg=4
hi xmlTag ctermfg=12
hi! link xmlString xmlTagName
hi! link xmlAttrib xmlTag
hi! link xmlEndTag xmlTag
hi! link xmlEqual xmlTag
"}}}
" JavaScript {{{
hi! link javaScript Normal
hi! link javaScriptBraces Delimiter
"}}}
" PHP {{{
hi phpSpecialFunction ctermfg=5
hi phpIdentifier ctermfg=11
hi phpParent ctermfg=8
hi! link phpVarSelector phpIdentifier
hi! link phpHereDoc String
hi! link phpDefine Statement
"}}}
" Markdown {{{
hi! link markdownHeadingRule NonText
@@ -144,14 +125,6 @@ hi markdownCode cterm=bold
hi markdownBold cterm=bold
hi markdownItalic cterm=underline
"}}}
" Ruby {{{
hi! link rubyDefine Statement
hi! link rubyLocalVariableOrMethod Identifier
hi! link rubyConstant Constant
hi! link rubyInstanceVariable Number
hi! link rubyStringDelimiter rubyString
"}}}
" Git {{{
hi gitCommitBranch ctermfg=3
@@ -170,23 +143,6 @@ hi! link vimSetSep Delimiter
hi! link vimContinue Delimiter
hi! link vimHiAttrib Constant
"}}}
" LESS {{{
hi lessVariable ctermfg=11
hi! link lessVariableValue Normal
"}}}
" NERDTree {{{
hi! link NERDTreeHelp Comment
hi! link NERDTreeExecFile String
"}}}
" Vimwiki {{{
hi! link VimwikiHeaderChar markdownHeadingDelimiter
hi! link VimwikiList markdownListMarker
hi! link VimwikiCode markdownCode
hi! link VimwikiCodeChar markdownCodeDelimiter
"}}}
" Help {{{
hi! link helpExample String
@@ -201,14 +157,6 @@ hi! link helpURL Underlined
hi! link CtrlPMatch String
hi! link CtrlPLinePre Comment
"}}}
" Mustache {{{
hi mustacheSection ctermfg=14 cterm=bold
hi mustacheMarker ctermfg=6
hi mustacheVariable ctermfg=14
hi mustacheVariableUnescape ctermfg=9
hi mustachePartial ctermfg=13
"}}}
" Shell {{{
hi shDerefSimple ctermfg=11
@@ -221,17 +169,6 @@ hi SyntasticErrorSign ctermfg=1 ctermbg=NONE
hi SyntasticStyleWarningSign ctermfg=2 ctermbg=NONE
hi SyntasticStyleErrorSign ctermfg=4 ctermbg=NONE
"}}}
" Netrw {{{
hi netrwExe ctermfg=9
hi netrwClassify ctermfg=8 cterm=bold
"}}}
" Ledger {{{
hi ledgerAccount ctermfg=11
hi! link ledgerMetadata Comment
hi! link ledgerTransactionStatus Statement
"}}}
" Diff {{{
hi diffAdded ctermfg=2
@@ -243,12 +180,6 @@ hi! link diffLine Title
" Plug {{{
hi plugSha ctermfg=3
"}}}
" Blade {{{
hi! link bladeStructure PreProc
hi! link bladeParen phpParent
hi! link bladeEchoDelim PreProc
"}}}
" vim: fdm=marker:sw=2:sts=2:et

View File

@@ -1,36 +0,0 @@
local dash = require('dashboard')
local custom_header = {
' .█▄╥ _▄K¥▄ ',
' █ `▀▄_ ▄▄ ╓▄▀" ▀▌ ',
' █ "▀▄, ▓ ▀▀▄ ▄▀- █ ',
' ▐▌ ▀▄▌▀▀▀▀`""▀▀█ ▀▄ _▄▀ ▓ ',
' ▓ "▓╥ "▓_.▓▀ ╫ ',
' )▌ ▀█ ╫ ',
' ▐∩ █ ',
' ▐∩ ▐▌ ',
' ▐µ █▌ ',
' ▓ ╨▓▓█▄▄╥_ ,▄▄█████▄ █ ',
' ▐▄ `"▀▀██▄ ▐███▌╓_ .▓" ',
' "▓▄ _▄▄███▀` ▄▄▄▄┐ "▀▀█████▄ .▄K▀▀▀▀█ ',
'▐▌▀▀▀▀ª ▀▀` "▀▄, _ _╥▄▀ ',
' ▓▄ _╥µ __ ,▄▄ ]µ ` ╫▌@╨ ▀▌ ',
' "▀▄` ▓K" *▌▄▄▀" "▀▀▓▀ ▀▄ ',
' █. ▐▌ j▌ _ █ ',
' █ , ▀▄ ▐▌ ▄▓"▀▀▀▀" ',
' ▐█K▀▀"▀¥██▌▄▄_ ╨▓_ _█ ,▄▄K▀▀ ',
' ▐▌ "▀W "▀" "█µ ',
' ▐█ "▓_ ',
' _▓▀ ▀▄ ',
' j█____ _ ▀▄ ',
' ``"▓" ▓⌐ ',
' █ ▐▌ ',
' ▀ ▀ ',
}
dash.setup{
config = {
theme = 'doom',
header = custom_header,
}
}