This commit is contained in:
Ale 2024-03-11 15:09:18 +01:00
parent d474ae420a
commit ceaa24c2b6
3 changed files with 9 additions and 215 deletions

View file

@ -12,220 +12,11 @@ if not vim.loop.fs_stat(lazypath) then
end end
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)
plugins = { require("lazy").setup({
{ spec = {
'nvim-telescope/telescope.nvim', { import = "plugins"}
dependencies = { 'nvim-lua/plenary.nvim' }
},
{
'windwp/nvim-autopairs',
event = 'InsertEnter',
config = function ()
require('nvim-autopairs').setup{}
end
},
{
'windwp/nvim-ts-autotag',
config = function ()
require('nvim-ts-autotag').setup()
end
},
{
'williamboman/mason.nvim',
config = function()
require('mason').setup()
end
},
{
'neovim/nvim-lspconfig',
config = function()
local lsp = require('lspconfig')
lsp.rust_analyzer.setup{}
lsp.lua_ls.setup{}
lsp.pyright.setup{}
lsp.tsserver.setup{}
lsp.html.setup{}
lsp.cssls.setup{}
lsp.cssmodules_ls.setup{}
lsp.astro.setup{}
end
},
{
'hrsh7th/nvim-cmp',
config = function()
require('luasnip.loaders.from_vscode').lazy_load()
local cmp = require('cmp')
cmp.setup({
snippet = {
expand = function(args)
require('luasnip').lsp_expand(args.body)
end
},
mapping = cmp.mapping.preset.insert ({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = cmp.mapping.confirm({ select = true }),
['<TAB>'] = cmp.mapping.confirm({ select = true }),
}),
sources = cmp.config.sources({
{name = 'nvim_lsp'},
{name = 'luasnip'},
{name = 'buffer'}
}),
})
end,
dependencies = {
{'hrsh7th/cmp-nvim-lsp'},
{'saadparwaiz1/cmp_luasnip'},
{'rafamadriz/friendly-snippets'},
{'L3MON4D3/LuaSnip'}
} }
}, })
{
'maxmx03/dracula.nvim',
lazy = false,
config = function ()
local dracula = require 'dracula'
dracula.setup()
vim.cmd.colorscheme 'dracula'
end
},
{
'jakewvincent/mkdnflow.nvim',
config = function()
require('mkdnflow').setup({})
end
},
{
'nvimdev/dashboard-nvim',
event = 'VimEnter',
config = function ()
require('dashboard').setup{
theme = "hyper"
}
end,
dependencies = {{'nvim-tree/nvim-web-devicons'}}
},
{
'akinsho/bufferline.nvim',
config = function ()
require('bufferline').setup {
options = {
separator_style = "thin",
indicator = {
style = "none"
},
diagnostics = "nvim_lsp",
always_show_bufferline = false,
offsets = {
{
filetype = "neo-tree",
text = "Explorer",
highlight = "directory",
separator = false
}
}
}
}
end,
dependencies = {
'nvim-tree/nvim-web-devicons',
},
},
{
'nvim-lualine/lualine.nvim',
config = function()
local colors_insert = {
line_background = '#282a36',
line_foreground = '#f8f8f2',
line_midtone = '#44475a',
pink = '#ff79c6',
ourple = '#bd93f9'
}
local cake_theme_dracula = {
insert = {
a = { fg = colors_insert.line_background, bg = colors_insert.pink },
b = { fg = colors_insert.line_foreground, bg = colors_insert.line_background },
z = { fg = colors_insert.line_foreground, bg = colors_insert.line_background }
},
normal = {
a = { fg = colors_insert.line_background, bg = colors_insert.ourple },
b = { fg = colors_insert.fg, bg = colors_insert.line_background },
z = { fg = colors_insert.fg, bg = colors_insert.line_background }
},
visual = {
},
replace = {
}
}
require('lualine').setup {
options = {
theme = cake_theme_dracula,
disabled_filetypes = {
statusline = {
"neo-tree"
}
},
section_separators = "",
component_separators = "",
},
sections = {
lualine_a = {'mode'},
lualine_b = {'filename', 'location'},
lualine_c = {},
lualine_x = {},
lualine_y = {},
lualine_z = {'diff','branch'}
}
}
end,
dependencies = {{'nvim-tree/nvim-web-devicons'}},
},
{
'nvim-neo-tree/neo-tree.nvim',
branch = "v3.x",
dependencies = {
{'nvim-lua/plenary.nvim'},
{'nvim-tree/nvim-web-devicons'},
{'MunifTanjim/nui.nvim'}
},
config = function ()
require("neo-tree").setup {
enable_git_status = true,
enable_diagnostics = true,
filesystem = {
follow_current_file = {
enabled = true
}
}
}
end
},
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function ()
local configs = require("nvim-treesitter.configs")
configs.setup({
ensure_installed = { "c", "rust", "lua", "vim", "vimdoc", "markdown" , "javascript", "typescript", "python", "html", "astro" },
sync_install = false,
highlight = { enable = true },
indent = { enable = true },
})
end
},
}
require("lazy").setup(plugins)
if vim.g.neovide == true then if vim.g.neovide == true then
vim.api.nvim_set_keymap('n', "<F11>", ":let g:neovide_fullscreen = !g:neovide_fullscreen<CR>", {}) vim.api.nvim_set_keymap('n', "<F11>", ":let g:neovide_fullscreen = !g:neovide_fullscreen<CR>", {})

View file

@ -19,5 +19,6 @@
"nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" }, "nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" },
"nvim-web-devicons": { "branch": "master", "commit": "cdbcca210cf3655aa9b31ebf2422763ecd85ee5c" }, "nvim-web-devicons": { "branch": "master", "commit": "cdbcca210cf3655aa9b31ebf2422763ecd85ee5c" },
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
"telescope.nvim": { "branch": "master", "commit": "f336f8cfab38a82f9f00df380d28f0c2a572f862" } "telescope.nvim": { "branch": "master", "commit": "f336f8cfab38a82f9f00df380d28f0c2a572f862" },
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" }
} }

View file

@ -4,7 +4,9 @@ return {
config = function() config = function()
local lsp = require('lspconfig') local lsp = require('lspconfig')
lsp.rust_analyzer.setup{} lsp.rust_analyzer.setup{}
lsp.zls.setup{}
lsp.lua_ls.setup{} lsp.lua_ls.setup{}
lsp.csharp_ls.setup{}
lsp.pyright.setup{} lsp.pyright.setup{}
lsp.tsserver.setup{} lsp.tsserver.setup{}
lsp.html.setup{} lsp.html.setup{}