dashboard improvements

This commit is contained in:
Ale 2024-07-27 21:33:08 +02:00
parent 32b147aff2
commit a9d5aee2b5
4 changed files with 95 additions and 73 deletions

View file

@ -4,7 +4,28 @@ return {
event = 'VimEnter',
config = function ()
require('dashboard').setup{
theme = "hyper"
theme = "hyper",
config = {
header = {
"",
"███████╗██╗ ██╗███████╗███████╗████████╗███╗ ██╗██╗ ██╗██╗███╗ ███╗",
"██╔════╝██║ ██║██╔════╝██╔════╝╚══██╔══╝████╗ ██║██║ ██║██║████╗ ████║",
"███████╗██║ █╗ ██║█████╗ █████╗ ██║ ██╔██╗ ██║██║ ██║██║██╔████╔██║",
"╚════██║██║███╗██║██╔══╝ ██╔══╝ ██║ ██║╚██╗██║╚██╗ ██╔╝██║██║╚██╔╝██║",
"███████║╚███╔███╔╝███████╗███████╗ ██║ ██║ ╚████║ ╚████╔╝ ██║██║ ╚═╝ ██║",
"╚══════╝ ╚══╝╚══╝ ╚══════╝╚══════╝ ╚═╝ ╚═╝ ╚═══╝ ╚═══╝ ╚═╝╚═╝ ╚═╝",
""
},
shortcut = {
{ desc = '󰊳 Update', group = '@property', action = 'Lazy update', key = 'u' },
},
footer = {}
},
hide = {
statusline,
tabline,
winbar
}
}
end,
dependencies = {{'nvim-tree/nvim-web-devicons'}}

View file

@ -1,48 +1,48 @@
return {
{
'neovim/nvim-lspconfig',
config = function()
local lsp = require('lspconfig')
lsp.rust_analyzer.setup{}
lsp.zls.setup{}
lsp.lua_ls.setup{}
lsp.csharp_ls.setup{}
lsp.pyright.setup{}
lsp.tsserver.setup{}
lsp.html.setup{}
lsp.cssls.setup{}
lsp.cssmodules_ls.setup{}
lsp.astro.setup{}
lsp.yamlls.setup{}
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
callback = function(ev)
-- Enable completion triggered by <c-x><c-o>
vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
{
'neovim/nvim-lspconfig',
config = function()
local lsp = require('lspconfig')
lsp.rust_analyzer.setup {}
lsp.zls.setup {}
lsp.lua_ls.setup {}
lsp.csharp_ls.setup {}
lsp.pyright.setup {}
lsp.tsserver.setup {}
lsp.html.setup {}
lsp.cssls.setup {}
lsp.cssmodules_ls.setup {}
lsp.astro.setup {}
lsp.yamlls.setup {}
lsp.gdscript.setup {}
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
callback = function(ev)
-- Enable completion triggered by <c-x><c-o>
vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
-- Buffer local mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local opts = { buffer = ev.buf }
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts)
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, opts)
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, opts)
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, opts)
vim.keymap.set('n', '<space>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, opts)
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, opts)
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, opts)
vim.keymap.set({ 'n', 'v' }, '<space>ca', vim.lsp.buf.code_action, opts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts)
vim.keymap.set('n', '<space>f', function()
vim.lsp.buf.format { async = true }
end, opts)
end
})
end
}
-- Buffer local mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local opts = { buffer = ev.buf }
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts)
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, opts)
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, opts)
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, opts)
vim.keymap.set('n', '<space>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, opts)
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, opts)
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, opts)
vim.keymap.set({ 'n', 'v' }, '<space>ca', vim.lsp.buf.code_action, opts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts)
vim.keymap.set('n', '<space>f', function()
vim.lsp.buf.format { async = true }
end, opts)
end
})
end
}
}

View file

@ -34,7 +34,8 @@ return {
theme = cake_theme_dracula,
disabled_filetypes = {
statusline = {
"neo-tree"
"neo-tree",
"dashboard"
}
},
section_separators = "",