Added cmdline plugin
This commit is contained in:
27
after/plugin/cmdline.lua
Normal file
27
after/plugin/cmdline.lua
Normal file
@@ -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",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -1,125 +1,136 @@
|
|||||||
local ensure_packer = function()
|
local ensure_packer = function()
|
||||||
local fn = vim.fn
|
local fn = vim.fn
|
||||||
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
|
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
|
||||||
if fn.empty(fn.glob(install_path)) > 0 then
|
if fn.empty(fn.glob(install_path)) > 0 then
|
||||||
fn.system({ "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path })
|
fn.system({ "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path })
|
||||||
vim.cmd([[packadd packer.nvim]])
|
vim.cmd([[packadd packer.nvim]])
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
local packer_bootstrap = ensure_packer() -- true if packer was just installed
|
local packer_bootstrap = ensure_packer() -- true if packer was just installed
|
||||||
|
|
||||||
-- vim.cmd [[packadd packer.nvim]]
|
vim.cmd([[packadd packer.nvim]])
|
||||||
|
|
||||||
-- import packer safely
|
-- import packer safely
|
||||||
local status, packer = pcall(require, "packer")
|
local status, packer = pcall(require, "packer")
|
||||||
if not status then
|
if not status then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
return packer.startup(function(use)
|
return packer.startup(function(use)
|
||||||
--Packer
|
--Packer
|
||||||
use 'wbthomason/packer.nvim'
|
use("wbthomason/packer.nvim")
|
||||||
--Themes
|
--Themes
|
||||||
use({
|
use({
|
||||||
"catppuccin/nvim",
|
"catppuccin/nvim",
|
||||||
as = "catppuccin",
|
as = "catppuccin",
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd [[colorscheme catppuccin-mocha]]
|
vim.cmd([[colorscheme catppuccin-mocha]])
|
||||||
end
|
end,
|
||||||
})
|
})
|
||||||
-- telescope
|
-- telescope
|
||||||
use {
|
use({
|
||||||
'nvim-telescope/telescope.nvim', tag = '0.1.1',
|
"nvim-telescope/telescope.nvim",
|
||||||
requires = { { 'nvim-lua/plenary.nvim' } }
|
tag = "0.1.1",
|
||||||
}
|
requires = { { "nvim-lua/plenary.nvim" } },
|
||||||
use {
|
})
|
||||||
"nvim-telescope/telescope-file-browser.nvim",
|
use({
|
||||||
requires = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }
|
"nvim-telescope/telescope-file-browser.nvim",
|
||||||
}
|
requires = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" },
|
||||||
use {
|
})
|
||||||
"nvim-telescope/telescope-project.nvim",
|
use({
|
||||||
requires = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }
|
"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({
|
||||||
use 'github/copilot.vim'
|
"nvim-telescope/telescope-fzf-native.nvim",
|
||||||
use {
|
run = "make",
|
||||||
'nvim-tree/nvim-tree.lua',
|
requires = { "nvim-telescope/telescope.nvim" },
|
||||||
requires = { { 'nvim-tree/nvim-web-devicons' } }
|
})
|
||||||
}
|
use({
|
||||||
use {
|
"VonHeikemen/fine-cmdline.nvim",
|
||||||
'nvim-treesitter/nvim-treesitter',
|
requires = {
|
||||||
run = ':TSUpdate'
|
{ "MunifTanjim/nui.nvim" },
|
||||||
}
|
},
|
||||||
--lsp
|
})
|
||||||
use {
|
-- development
|
||||||
'williamboman/mason.nvim',
|
use("github/copilot.vim")
|
||||||
run = function()
|
use({
|
||||||
pcall(vim.cmd, 'MasonUpdate')
|
"nvim-tree/nvim-tree.lua",
|
||||||
end,
|
requires = { { "nvim-tree/nvim-web-devicons" } },
|
||||||
}
|
})
|
||||||
use{ 'neovim/nvim-lspconfig' }
|
use({
|
||||||
use{ 'williamboman/mason-lspconfig.nvim' }
|
"nvim-treesitter/nvim-treesitter",
|
||||||
-- formatters and linters
|
run = ":TSUpdate",
|
||||||
use("jose-elias-alvarez/null-ls.nvim")
|
})
|
||||||
use("jayp0521/mason-null-ls.nvim")
|
--lsp
|
||||||
-- completion
|
use({
|
||||||
use{ 'hrsh7th/nvim-cmp' }
|
"williamboman/mason.nvim",
|
||||||
use{ 'hrsh7th/cmp-nvim-lsp' }
|
run = function()
|
||||||
use("hrsh7th/cmp-buffer")
|
pcall(vim.cmd, "MasonUpdate")
|
||||||
use("hrsh7th/cmp-path")
|
end,
|
||||||
-- snippets
|
})
|
||||||
use("L3MON4D3/LuaSnip")
|
use({ "neovim/nvim-lspconfig" })
|
||||||
use("saadparwaiz1/cmp_luasnip")
|
use({ "williamboman/mason-lspconfig.nvim" })
|
||||||
use("rafamadriz/friendly-snippets")
|
-- formatters and linters
|
||||||
use("onsails/lspkind.nvim")
|
use("jose-elias-alvarez/null-ls.nvim")
|
||||||
use {
|
use("jayp0521/mason-null-ls.nvim")
|
||||||
"folke/trouble.nvim",
|
-- completion
|
||||||
requires = { "nvim-tree/nvim-web-devicons" },
|
use({ "hrsh7th/nvim-cmp" })
|
||||||
}
|
use({ "hrsh7th/cmp-nvim-lsp" })
|
||||||
use({
|
use("hrsh7th/cmp-buffer")
|
||||||
"iamcco/markdown-preview.nvim",
|
use("hrsh7th/cmp-path")
|
||||||
run = function() vim.fn["mkdp#util#install"]() end,
|
-- snippets
|
||||||
})
|
use("L3MON4D3/LuaSnip")
|
||||||
use {
|
use("saadparwaiz1/cmp_luasnip")
|
||||||
'numToStr/Comment.nvim',
|
use("rafamadriz/friendly-snippets")
|
||||||
config = function()
|
use("onsails/lspkind.nvim")
|
||||||
end
|
use({
|
||||||
}
|
"folke/trouble.nvim",
|
||||||
use { 'TimUntersberger/neogit', requires = 'nvim-lua/plenary.nvim',}
|
requires = { "nvim-tree/nvim-web-devicons" },
|
||||||
use 'sindrets/diffview.nvim'
|
})
|
||||||
use("windwp/nvim-autopairs")
|
use({
|
||||||
use({ "windwp/nvim-ts-autotag", after = "nvim-treesitter" })
|
"iamcco/markdown-preview.nvim",
|
||||||
use('lewis6991/gitsigns.nvim')
|
run = function()
|
||||||
-- useful plugins
|
vim.fn["mkdp#util#install"]()
|
||||||
use {
|
end,
|
||||||
"folke/which-key.nvim",
|
})
|
||||||
config = function()
|
use({
|
||||||
vim.o.timeout = true
|
"numToStr/Comment.nvim",
|
||||||
vim.o.timeoutlen = 300
|
config = function() end,
|
||||||
require("which-key").setup {}
|
})
|
||||||
end
|
use({ "TimUntersberger/neogit", requires = "nvim-lua/plenary.nvim" })
|
||||||
}
|
use("sindrets/diffview.nvim")
|
||||||
use {
|
use("windwp/nvim-autopairs")
|
||||||
'nvim-lualine/lualine.nvim',
|
use({ "windwp/nvim-ts-autotag", after = "nvim-treesitter" })
|
||||||
requires = { 'nvim-tree/nvim-web-devicons', opt = true }
|
use("lewis6991/gitsigns.nvim")
|
||||||
}
|
-- useful plugins
|
||||||
use 'rcarriga/nvim-notify'
|
use({
|
||||||
use { 'akinsho/bufferline.nvim', tag = "*", requires = 'nvim-tree/nvim-web-devicons' }
|
"folke/which-key.nvim",
|
||||||
use 'andweeb/presence.nvim'
|
config = function()
|
||||||
use({
|
vim.o.timeout = true
|
||||||
"kylechui/nvim-surround",
|
vim.o.timeoutlen = 300
|
||||||
tag = "*",
|
require("which-key").setup({})
|
||||||
config = function()
|
end,
|
||||||
require("nvim-surround").setup({
|
})
|
||||||
})
|
use({
|
||||||
end
|
"nvim-lualine/lualine.nvim",
|
||||||
})
|
requires = { "nvim-tree/nvim-web-devicons", opt = true },
|
||||||
use 'ObserverOfTime/nvimcord'
|
})
|
||||||
-- packer autosync
|
use("rcarriga/nvim-notify")
|
||||||
if packer_bootstrap then
|
use({ "akinsho/bufferline.nvim", tag = "*", requires = "nvim-tree/nvim-web-devicons" })
|
||||||
require("packer").sync()
|
use("andweeb/presence.nvim")
|
||||||
end
|
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)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user