removed dashboard, added autopairs
This commit is contained in:
parent
f96c279cfa
commit
d871422273
9 changed files with 54 additions and 50 deletions
|
@ -21,9 +21,10 @@
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = 'nvim_lsp' },
|
{ name = 'nvim_lsp' },
|
||||||
{ name = 'luasnip' }, -- For luasnip users.
|
{ name = 'luasnip' }, -- For luasnip users.
|
||||||
}, {
|
{ name = 'nvim_lua' },
|
||||||
{ name = 'buffer' },
|
{ name = 'buffer' },
|
||||||
-- { name = 'path' },
|
{ name = 'path' },
|
||||||
|
{ name = 'nvim_lsp_signature_help' },
|
||||||
-- { name = 'cmdline' },
|
-- { name = 'cmdline' },
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
config = {
|
|
||||||
center = {
|
|
||||||
{
|
|
||||||
icon = '',
|
|
||||||
icon_hl = 'group',
|
|
||||||
desc = 'description',
|
|
||||||
desc_hl = 'group',
|
|
||||||
key = 'shortcut key in dashboard buffer not keymap !!',
|
|
||||||
key_hl = 'group',
|
|
||||||
key_format = ' [%s]', -- `%s` will be substituted with value of `key`
|
|
||||||
action = '',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
footer = {},
|
|
||||||
vertical_center = false, -- Center the Dashboard on the vertical (from top to bottom)
|
|
||||||
}
|
|
6
lua/config/plugins/lsp.lua
Normal file
6
lua/config/plugins/lsp.lua
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
local lspconfig = require("lspconfig")
|
||||||
|
lspconfig.lua_ls.setup({})
|
||||||
|
|
||||||
|
vim.keymap.set('n', 'K', vim.lsp.buf.hover, {})
|
||||||
|
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {})
|
||||||
|
vim.keymap.set({'n', 'v'}, '<space>ca', vim.lsp.buf.code_action, {})
|
9
lua/config/plugins/mason.lua
Normal file
9
lua/config/plugins/mason.lua
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
ui = {
|
||||||
|
icons = {
|
||||||
|
package_installed = "",
|
||||||
|
package_pending = "",
|
||||||
|
package_uninstalled = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
max_concurrent_installers = 10
|
|
@ -31,7 +31,7 @@ o.splitright = true
|
||||||
o.splitbelow = true
|
o.splitbelow = true
|
||||||
o.termguicolors = true
|
o.termguicolors = true
|
||||||
|
|
||||||
-- opt.shortmess:append "sI"
|
opt.shortmess:append "sI"
|
||||||
opt.whichwrap:append "<>[]hl"
|
opt.whichwrap:append "<>[]hl"
|
||||||
opt.fillchars = { eob = " " }
|
opt.fillchars = { eob = " " }
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,25 @@ return {
|
||||||
{
|
{
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"hrsh7th/cmp-cmdline",
|
{ "hrsh7th/cmp-nvim-lua" },
|
||||||
"hrsh7th/cmp-path",
|
{ "hrsh7th/cmp-nvim-lsp-signature-help" },
|
||||||
"hrsh7th/cmp-buffer"
|
{ "hrsh7th/cmp-cmdline" },
|
||||||
|
{ "hrsh7th/cmp-path" },
|
||||||
|
{ "hrsh7th/cmp-buffer" },
|
||||||
|
{
|
||||||
|
"windwp/nvim-autopairs",
|
||||||
|
event = "InsertEnter",
|
||||||
|
opts = {
|
||||||
|
fast_wrap = {},
|
||||||
|
disable_filetype = { "TelescopePrompt", "vim" },
|
||||||
|
},
|
||||||
|
config = function(opts)
|
||||||
|
require("nvim-autopairs").setup(opts)
|
||||||
|
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
|
||||||
|
local cmp = require('cmp')
|
||||||
|
require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
||||||
|
end
|
||||||
|
}
|
||||||
},
|
},
|
||||||
opts = function()
|
opts = function()
|
||||||
require "config.plugins.cmp"
|
require "config.plugins.cmp"
|
||||||
|
@ -13,13 +29,20 @@ return {
|
||||||
{
|
{
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
dependencies = {},
|
dependencies = {},
|
||||||
|
-- [[
|
||||||
config = function ()
|
config = function ()
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
|
|
||||||
require('lspconfig').clangd.setup {
|
require('lspconfig').clangd.setup {
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
}
|
}
|
||||||
|
require('lspconfig').pylsp.setup {
|
||||||
|
capabilities = capabilities
|
||||||
|
}
|
||||||
|
require('lspconfig').ltex.setup {
|
||||||
|
capabilities = capabilities
|
||||||
|
}
|
||||||
end,
|
end,
|
||||||
|
--]]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"L3MON4D3/LuaSnip",
|
"L3MON4D3/LuaSnip",
|
||||||
|
|
|
@ -3,26 +3,15 @@ return {
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
dependencies= {},
|
dependencies= {},
|
||||||
config = function()
|
config = function()
|
||||||
local lspconfig = require("lspconfig")
|
require "config.plugins.lsp"
|
||||||
lspconfig.lua_ls.setup({})
|
|
||||||
|
|
||||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, {})
|
|
||||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {})
|
|
||||||
vim.keymap.set({'n', 'v'}, '<space>ca', vim.lsp.buf.code_action, {})
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
dependencies = {},
|
dependencies = {},
|
||||||
opts = {
|
opts = function ()
|
||||||
ui = {
|
require "config.plugins.mason"
|
||||||
icons = {
|
end
|
||||||
package_installed = "✓",
|
|
||||||
package_pending = "➜",
|
|
||||||
package_uninstalled = "✗"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
event = { "BufReadPost", "BufNewFile" },
|
||||||
|
cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" },
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
dependencies = {},
|
dependencies = {},
|
||||||
opts = {
|
opts = {
|
||||||
|
|
|
@ -1,14 +1,4 @@
|
||||||
return {
|
return {
|
||||||
{
|
|
||||||
"nvimdev/dashboard-nvim",
|
|
||||||
event = "VimEnter",
|
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons"},
|
|
||||||
config = function()
|
|
||||||
require('dashboard').setup {
|
|
||||||
require "config.plugins.dashboard"
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"RedsXDD/neopywal.nvim",
|
"RedsXDD/neopywal.nvim",
|
||||||
name = "neopywal",
|
name = "neopywal",
|
||||||
|
|
Loading…
Add table
Reference in a new issue