diff --git a/nvim/init.lua b/nvim/init.lua index cf8dd2f..d7456f7 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -12,220 +12,11 @@ if not vim.loop.fs_stat(lazypath) then end vim.opt.rtp:prepend(lazypath) -plugins = { - { - 'nvim-telescope/telescope.nvim', - 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 ({ - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.abort(), - [''] = cmp.mapping.confirm({ select = true }), - [''] = 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) +require("lazy").setup({ + spec = { + { import = "plugins"} + } +}) if vim.g.neovide == true then vim.api.nvim_set_keymap('n', "", ":let g:neovide_fullscreen = !g:neovide_fullscreen", {}) diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index bce313a..6fbc275 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -19,5 +19,6 @@ "nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" }, "nvim-web-devicons": { "branch": "master", "commit": "cdbcca210cf3655aa9b31ebf2422763ecd85ee5c" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, - "telescope.nvim": { "branch": "master", "commit": "f336f8cfab38a82f9f00df380d28f0c2a572f862" } + "telescope.nvim": { "branch": "master", "commit": "f336f8cfab38a82f9f00df380d28f0c2a572f862" }, + "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" } } \ No newline at end of file diff --git a/nvim/lua/plugins/lspconfig.lua b/nvim/lua/plugins/lspconfig.lua index 662b020..29b3c8a 100644 --- a/nvim/lua/plugins/lspconfig.lua +++ b/nvim/lua/plugins/lspconfig.lua @@ -4,7 +4,9 @@ return { 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{}