diff --git a/after/plugin/cmdline.lua b/after/plugin/cmdline.lua new file mode 100644 index 0000000..1c8547e --- /dev/null +++ b/after/plugin/cmdline.lua @@ -0,0 +1,27 @@ +local status, cmdline = pcall(require, "fine-cmdline") +if not status then + return +end + +cmdline.setup({ + cmdline = { + enable_keymaps = true, + smart_history = true, + prompt = "> ", + }, + popup = { + position = { + row = "10%", + col = "50%", + }, + size = { + width = "80%", + }, + border = { + style = "rounded", + }, + win_options = { + winhighlight = "Normal:Normal,FloatBorder:FloatBorder", + }, + }, +}) diff --git a/lua/taken/packer.lua b/lua/taken/packer.lua index 4337009..9da1f32 100644 --- a/lua/taken/packer.lua +++ b/lua/taken/packer.lua @@ -1,125 +1,136 @@ local ensure_packer = function() - local fn = vim.fn - local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" - if fn.empty(fn.glob(install_path)) > 0 then - fn.system({ "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path }) - vim.cmd([[packadd packer.nvim]]) - return true - end - return false + local fn = vim.fn + local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" + if fn.empty(fn.glob(install_path)) > 0 then + fn.system({ "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path }) + vim.cmd([[packadd packer.nvim]]) + return true + end + return false end local packer_bootstrap = ensure_packer() -- true if packer was just installed --- vim.cmd [[packadd packer.nvim]] +vim.cmd([[packadd packer.nvim]]) -- import packer safely local status, packer = pcall(require, "packer") if not status then - return + return end return packer.startup(function(use) - --Packer - use 'wbthomason/packer.nvim' - --Themes - use({ - "catppuccin/nvim", - as = "catppuccin", - config = function() - vim.cmd [[colorscheme catppuccin-mocha]] - end - }) - -- telescope - use { - 'nvim-telescope/telescope.nvim', tag = '0.1.1', - requires = { { 'nvim-lua/plenary.nvim' } } - } - use { - "nvim-telescope/telescope-file-browser.nvim", - requires = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" } - } - use { - "nvim-telescope/telescope-project.nvim", - requires = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" } - } - use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' } - -- development - use 'github/copilot.vim' - use { - 'nvim-tree/nvim-tree.lua', - requires = { { 'nvim-tree/nvim-web-devicons' } } - } - use { - 'nvim-treesitter/nvim-treesitter', - run = ':TSUpdate' - } - --lsp - use { - 'williamboman/mason.nvim', - run = function() - pcall(vim.cmd, 'MasonUpdate') - end, - } - use{ 'neovim/nvim-lspconfig' } - use{ 'williamboman/mason-lspconfig.nvim' } - -- formatters and linters - use("jose-elias-alvarez/null-ls.nvim") - use("jayp0521/mason-null-ls.nvim") - -- completion - use{ 'hrsh7th/nvim-cmp' } - use{ 'hrsh7th/cmp-nvim-lsp' } - use("hrsh7th/cmp-buffer") - use("hrsh7th/cmp-path") - -- snippets - use("L3MON4D3/LuaSnip") - use("saadparwaiz1/cmp_luasnip") - use("rafamadriz/friendly-snippets") - use("onsails/lspkind.nvim") - use { - "folke/trouble.nvim", - requires = { "nvim-tree/nvim-web-devicons" }, - } - use({ - "iamcco/markdown-preview.nvim", - run = function() vim.fn["mkdp#util#install"]() end, - }) - use { - 'numToStr/Comment.nvim', - config = function() - end - } - use { 'TimUntersberger/neogit', requires = 'nvim-lua/plenary.nvim',} - use 'sindrets/diffview.nvim' - use("windwp/nvim-autopairs") - use({ "windwp/nvim-ts-autotag", after = "nvim-treesitter" }) - use('lewis6991/gitsigns.nvim') - -- useful plugins - use { - "folke/which-key.nvim", - config = function() - vim.o.timeout = true - vim.o.timeoutlen = 300 - require("which-key").setup {} - end - } - use { - 'nvim-lualine/lualine.nvim', - requires = { 'nvim-tree/nvim-web-devicons', opt = true } - } - use 'rcarriga/nvim-notify' - use { 'akinsho/bufferline.nvim', tag = "*", requires = 'nvim-tree/nvim-web-devicons' } - use 'andweeb/presence.nvim' - use({ - "kylechui/nvim-surround", - tag = "*", - config = function() - require("nvim-surround").setup({ - }) - end - }) - use 'ObserverOfTime/nvimcord' - -- packer autosync - if packer_bootstrap then - require("packer").sync() - end + --Packer + use("wbthomason/packer.nvim") + --Themes + use({ + "catppuccin/nvim", + as = "catppuccin", + config = function() + vim.cmd([[colorscheme catppuccin-mocha]]) + end, + }) + -- telescope + use({ + "nvim-telescope/telescope.nvim", + tag = "0.1.1", + requires = { { "nvim-lua/plenary.nvim" } }, + }) + use({ + "nvim-telescope/telescope-file-browser.nvim", + requires = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }, + }) + use({ + "nvim-telescope/telescope-project.nvim", + requires = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }, + }) + use({ + "nvim-telescope/telescope-fzf-native.nvim", + run = "make", + requires = { "nvim-telescope/telescope.nvim" }, + }) + use({ + "VonHeikemen/fine-cmdline.nvim", + requires = { + { "MunifTanjim/nui.nvim" }, + }, + }) + -- development + use("github/copilot.vim") + use({ + "nvim-tree/nvim-tree.lua", + requires = { { "nvim-tree/nvim-web-devicons" } }, + }) + use({ + "nvim-treesitter/nvim-treesitter", + run = ":TSUpdate", + }) + --lsp + use({ + "williamboman/mason.nvim", + run = function() + pcall(vim.cmd, "MasonUpdate") + end, + }) + use({ "neovim/nvim-lspconfig" }) + use({ "williamboman/mason-lspconfig.nvim" }) + -- formatters and linters + use("jose-elias-alvarez/null-ls.nvim") + use("jayp0521/mason-null-ls.nvim") + -- completion + use({ "hrsh7th/nvim-cmp" }) + use({ "hrsh7th/cmp-nvim-lsp" }) + use("hrsh7th/cmp-buffer") + use("hrsh7th/cmp-path") + -- snippets + use("L3MON4D3/LuaSnip") + use("saadparwaiz1/cmp_luasnip") + use("rafamadriz/friendly-snippets") + use("onsails/lspkind.nvim") + use({ + "folke/trouble.nvim", + requires = { "nvim-tree/nvim-web-devicons" }, + }) + use({ + "iamcco/markdown-preview.nvim", + run = function() + vim.fn["mkdp#util#install"]() + end, + }) + use({ + "numToStr/Comment.nvim", + config = function() end, + }) + use({ "TimUntersberger/neogit", requires = "nvim-lua/plenary.nvim" }) + use("sindrets/diffview.nvim") + use("windwp/nvim-autopairs") + use({ "windwp/nvim-ts-autotag", after = "nvim-treesitter" }) + use("lewis6991/gitsigns.nvim") + -- useful plugins + use({ + "folke/which-key.nvim", + config = function() + vim.o.timeout = true + vim.o.timeoutlen = 300 + require("which-key").setup({}) + end, + }) + use({ + "nvim-lualine/lualine.nvim", + requires = { "nvim-tree/nvim-web-devicons", opt = true }, + }) + use("rcarriga/nvim-notify") + use({ "akinsho/bufferline.nvim", tag = "*", requires = "nvim-tree/nvim-web-devicons" }) + use("andweeb/presence.nvim") + use({ + "kylechui/nvim-surround", + tag = "*", + config = function() + require("nvim-surround").setup({}) + end, + }) + use("ObserverOfTime/nvimcord") + -- packer autosync + if packer_bootstrap then + require("packer").sync() + end end)