From d435d54b0c55c22216f51f22b342d5c5b452e3bc Mon Sep 17 00:00:00 2001 From: Aniket Patel Date: Tue, 27 Aug 2024 19:30:08 +0530 Subject: [PATCH] added dashboard and enabled lsps for rust and python --- init.lua | 18 +++++++++++------- lua/custom/plugins/dashboard.lua | 31 +++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 7 deletions(-) create mode 100644 lua/custom/plugins/dashboard.lua diff --git a/init.lua b/init.lua index 13c8143d..21616b30 100644 --- a/init.lua +++ b/init.lua @@ -93,6 +93,10 @@ vim.g.maplocalleader = ' ' -- Set to true if you have a Nerd Font installed and selected in the terminal vim.g.have_nerd_font = false +-- disabling netrw +vim.g.loaded_netrwPlugin = 1 +vim.g.loaded_netrw = 1 + -- [[ Setting options ]] -- See `:help vim.opt` -- NOTE: You can change these options as you wish! @@ -607,8 +611,8 @@ require('lazy').setup({ local servers = { -- clangd = {}, -- gopls = {}, - -- pyright = {}, - -- rust_analyzer = {}, + pyright = {}, + rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- -- Some languages (like typescript) have entire language plugins that can be useful: @@ -700,7 +704,7 @@ require('lazy').setup({ formatters_by_ft = { lua = { 'stylua' }, -- Conform can also run multiple formatters sequentially - -- python = { "isort", "black" }, + python = { 'isort', 'black' }, -- -- You can use 'stop_after_first' to run the first available formatter from the list -- javascript = { "prettierd", "prettier", stop_after_first = true }, @@ -918,18 +922,18 @@ require('lazy').setup({ -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- -- require 'kickstart.plugins.debug', - -- require 'kickstart.plugins.indent_line', + require 'kickstart.plugins.indent_line', -- require 'kickstart.plugins.lint', -- require 'kickstart.plugins.autopairs', - -- require 'kickstart.plugins.neo-tree', - -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps + require 'kickstart.plugins.neo-tree', + require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins` - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, }, { ui = { -- If you are using a Nerd Font: set icons to an empty table which will use the diff --git a/lua/custom/plugins/dashboard.lua b/lua/custom/plugins/dashboard.lua new file mode 100644 index 00000000..44d357cf --- /dev/null +++ b/lua/custom/plugins/dashboard.lua @@ -0,0 +1,31 @@ +return { + { + 'echasnovski/mini.nvim', + config = function() + require('mini.starter').setup { + header = table.concat({ + '███╗ ██╗██╗ ██╗██╗███╗ ███╗', + '████╗ ██║██║ ██║██║████╗ ████║', + '██╔██╗ ██║██║ ██║██║██╔████╔██║', + '██║╚██╗██║╚██╗ ██╔╝██║██║╚██╔╝██║', + '██║ ╚████║ ╚████╔╝ ██║██║ ╚═╝ ██║', + '╚═╝ ╚═══╝ ╚═══╝ ╚═╝╚═╝ ╚═╝', + '', + ' ', + }, '\n'), + items = { + { action = 'Telescope find_files', name = ' 🔍 Find File', section = 'Files' }, + { action = 'Telescope oldfiles', name = ' 📂 Recent Files', section = 'Files' }, + { action = 'Telescope live_grep', name = ' 🔎 Find Text', section = 'Search' }, + { action = 'Lazy update', name = ' 🔄 Update Plugins', section = 'Plugins' }, + { action = 'qall', name = '  Quit', section = 'Exit' }, + }, + footer = 'Neovim - The hyperextensible Vim-based text editor', + content_hooks = { + require('mini.starter').gen_hook.adding_bullet '*', + require('mini.starter').gen_hook.aligning('center', 'center'), + }, + } + end, + }, +}