This commit is contained in:
Dominik Säume 2024-09-10 09:41:43 +02:00
parent d594d6f447
commit b49bffeeb4
Signed by: SZUT-Dominik
GPG key ID: 67D15BB250B41E7C
13 changed files with 143 additions and 59 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
lazy-lock.json
.idea/
dap/

View file

@ -9,24 +9,97 @@ return {
local dashboard = require('alpha.themes.startify')
-- Header --
dashboard.section.header.val = {
[[ ]],
[[ ]],
[[ ]],
[[ ]],
[[  ]],
[[ ████ ██████ █████ ██ ]],
[[ ███████████ █████  ]],
[[ █████████ ███████████████████ ███ ███████████ ]],
[[ █████████ ███ █████████████ █████ ██████████████ ]],
[[ █████████ ██████████ █████████ █████ █████ ████ █████ ]],
[[ ███████████ ███ ███ █████████ █████ █████ ████ █████ ]],
[[ ██████ █████████████████████ ████ █████ █████ ████ ██████ ]],
[[ ]],
[[ ]],
[[ ]],
}
local function getCharLen(s, pos)
local byte = string.byte(s, pos)
if not byte then
return nil
end
return (byte < 0x80 and 1)
or (byte < 0xE0 and 2)
or (byte < 0xF0 and 3)
or (byte < 0xF8 and 4)
or 1
end
alpha.setup(dashboard.opts)
local function applyColors(logo, colors, logoColors)
dashboard.section.header.val = logo
for key, color in pairs(colors) do
local name = 'Alpha' .. key
vim.api.nvim_set_hl(0, name, color)
colors[key] = name
end
dashboard.section.header.opts.hl = {}
for i, line in ipairs(logoColors) do
local highlights = {}
local pos = 0
for j = 1, #line do
local opos = pos
pos = pos + getCharLen(logo[i], opos + 1)
local color_name = colors[line:sub(j, j)]
if color_name then
table.insert(highlights, { color_name, opos, pos })
end
end
table.insert(dashboard.section.header.opts.hl, highlights)
end
return dashboard.opts
end
alpha.setup(applyColors({
[[ ███ ███ ]],
[[ ████ ████ ]],
[[  ████ █████ ]],
[[ █ ████ █████ ]],
[[ ██ ████ █████ ]],
[[ ███ ████ █████ ]],
[[ ████ ████ ████ ]],
[[ █████ ████████ ]],
[[ █████ ███████ ]],
[[ █████ ██████ ]],
[[ █████ █████ ]],
[[ ████ ████ ]],
[[ ███ ███ ]],
[[ ]],
[[ N E O V I M ]],
}, {
['b'] = { fg = '#3399ff', ctermfg = 33 },
['a'] = { fg = '#53C670', ctermfg = 35 },
['g'] = { fg = '#39ac56', ctermfg = 29 },
['h'] = { fg = '#33994d', ctermfg = 23 },
['i'] = {
fg = '#33994d',
bg = '#39ac56',
ctermfg = 23,
ctermbg = 29,
},
['j'] = {
fg = '#53C670',
bg = '#33994d',
ctermfg = 35,
ctermbg = 23,
},
['k'] = { fg = '#30A572', ctermfg = 36 },
}, {
[[ kkkka gggg ]],
[[ kkkkaa ggggg ]],
[[ b kkkaaa ggggg ]],
[[ bb kkaaaa ggggg ]],
[[ bbb kaaaaa ggggg ]],
[[ bbbb aaaaaa ggggg ]],
[[ bbbbb aaaaaa igggg ]],
[[ bbbbb aaaaaahiggg ]],
[[ bbbbb aaaaajhigg ]],
[[ bbbbb aaaaajhig ]],
[[ bbbbb aaaaajhi ]],
[[ bbbbb aaaaajh ]],
[[ bbbb aaaaa ]],
[[ ]],
[[ a a a b b b ]],
}))
end,
}

View file

@ -46,7 +46,7 @@ return {
},
})
-- Dignostic Icons --
-- Diagnostic Icons --
vim.fn.sign_define('DiagnosticSignError', {
text = '',
texthl = 'DiagnosticSignError',

View file

@ -86,7 +86,14 @@ return {
'nvim-tree/nvim-web-devicons',
},
config = function()
require('lspsaga').setup({})
require('lspsaga').setup({
symbol_in_winbar = {
enable = false,
},
lightbulb = {
enable = false
}
})
-- Keybinding --
vim.keymap.set(

View file

@ -30,6 +30,12 @@ return {
load_ft_func = require('luasnip_snippets.common.snip_utils').load_ft_func,
ft_func = require('luasnip_snippets.common.snip_utils').ft_func,
enable_autosnippets = true,
sources = {
{
name = "lazydev",
group_index = 0
}
}
})
-- Keybinding --

View file

@ -2,7 +2,7 @@ local T = require('toolchain')
local M = {}
function M.setup()
T.add_highlighter_autoinstalls( 'json', 'xml', 'yaml', 'toml' )
T.add_highlighter_autoinstalls('json', 'xml', 'yaml', 'toml')
T.add_null_ls_module(function(null_ls)
return {
@ -20,22 +20,21 @@ function M.setup()
lspconfig.taplo.setup(config)
end)
T.add_plugins(
{
T.add_plugins({
'folke/neoconf.nvim',
priority = 10000,
config = function() require('neoconf').setup() end,
}, {
'folke/lazydev.nvim',
dependencies = {
'folke/neoconf.nvim',
},
ft = 'lua',
opts = {
library = {},
},
},
{
"folke/neoconf.nvim",
priority = 100,
event = 'BufEnter *.lua',
config = function()
require('neoconf').setup()
end
}
)
require('lazydev').setup(require('neoconf').get('lazydev'))
end,
})
end
return M

View file

@ -2,12 +2,10 @@ local T = require('toolchain')
local M = {}
function M.setup()
T.add_highlighter_autoinstalls('lua','luadoc')
T.add_highlighter_autoinstalls('lua', 'luadoc')
T.add_null_ls_module(function(null_ls)
return {
-- Diagnostics
null_ls.builtins.diagnostics.selene,
-- Formatter
null_ls.builtins.formatting.stylua,
}
@ -15,16 +13,7 @@ function M.setup()
T.add_lsp_autoinstalls('lua_ls')
T.add_lsps(function(lspconfig, capabilities)
lspconfig.lua_ls.setup({
capabilities = capabilities,
settings = {
Lua = {
diagnostics = {
globals = { 'vim' },
},
},
},
})
lspconfig.lua_ls.setup({ capabilities = capabilities })
end)
end

View file

@ -24,6 +24,8 @@ function M.setup()
lspconfig.phpactor.setup(config)
lspconfig.stimulus_ls.setup(config)
end)
--TODO: move Dap config here
end
return M

View file

@ -10,7 +10,6 @@ function M.setup()
-- Actions
null_ls.builtins.code_actions.proselint,
-- Diagnostics
null_ls.builtins.diagnostics.alex,
null_ls.builtins.diagnostics.codespell,
null_ls.builtins.diagnostics.trail_space,
-- Formatter

View file

@ -15,7 +15,7 @@ function M.setup()
}
end)
T.add_lsp_autoinstalls('html', 'emmet_ls', 'cssls', 'tailwindcss', 'eslint', 'tsserver')
T.add_lsp_autoinstalls('html', 'emmet_ls', 'cssls', 'tailwindcss', 'eslint', 'ts_ls')
T.add_lsps(function(lspconfig, capabilities)
local config = { capabilities = capabilities }
@ -23,7 +23,7 @@ function M.setup()
lspconfig.emmet_ls.setup(config)
lspconfig.cssls.setup(config)
lspconfig.tailwindcss.setup(config)
lspconfig.tsserver.setup(config)
lspconfig.ts_ls.setup(config)
lspconfig.eslint.setup(config)
end)
end

View file

@ -13,11 +13,11 @@ function CONFIG.get(module, name)
end
local config_file = vim.fn.readfile(config_file_path, "")
local succes, data = pcall(function()
local success, data = pcall(function()
return vim.json.decode(table.concat(config_file, ""))
end)
if not succes or data then
if not success or data then
return nil
end

View file

@ -1,7 +1,15 @@
{
"lazydev": {
"library": [
"LazyVim"
"LazyVim",
"lazy.nvim"
]
},
"lspconfig": {
"lua_ls": {
"Lua.diagnostics.globals": [
"vim"
]
}
}
}