fixed config and plugins
This commit is contained in:
parent
4f6a4c571d
commit
aaa91a6169
12 changed files with 125 additions and 142 deletions
|
@ -2,18 +2,31 @@ return {
|
|||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp"
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-buffer"
|
||||
},
|
||||
opts = function()
|
||||
require "config.plugins.cmp"
|
||||
end,
|
||||
},
|
||||
{
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
dependencies = {},
|
||||
config = function ()
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
require('lspconfig').clangd.setup {
|
||||
capabilities = capabilities,
|
||||
}
|
||||
end,
|
||||
},
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
dependencies = {
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"rafamadriz/friendly-snippets"
|
||||
dependencies = {
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"rafamadriz/friendly-snippets"
|
||||
},
|
||||
opts = {}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,34 +1,36 @@
|
|||
return {
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
require("mason").setup({
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "✓",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗"
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = function()
|
||||
require "config.plugins.mason"
|
||||
dependencies= {},
|
||||
config = function()
|
||||
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, {})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
"neovim/nvim-lspconfig"
|
||||
},
|
||||
"williamboman/mason.nvim",
|
||||
dependencies = {},
|
||||
opts = {
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = { "lua_ls" },
|
||||
})
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "✓",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
dependencies = {},
|
||||
config = function()
|
||||
require("mason-lspconfig").setup {
|
||||
ensure_installed = { "lua_ls" },
|
||||
}
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
dependencies = {},
|
||||
opts = function()
|
||||
require "config.plugins.mason"
|
||||
end,
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
"neovim/nvim-lspconfig"
|
||||
},
|
||||
opts = {
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = { "lua_ls" },
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
15
lua/plugins/nonels.lua
Normal file
15
lua/plugins/nonels.lua
Normal file
|
@ -0,0 +1,15 @@
|
|||
return {
|
||||
{
|
||||
"nvimtools/none-ls.nvim",
|
||||
config = function()
|
||||
local null_ls = require("null-ls")
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.formatting.stylua,
|
||||
-- null_ls.builtins.completion.spell,
|
||||
},
|
||||
})
|
||||
vim.keymap.set("n", "<space>gf", vim.lsp.buf.format, {})
|
||||
end,
|
||||
},
|
||||
}
|
24
lua/plugins/telescope.lua
Normal file
24
lua/plugins/telescope.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
return {
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
config = function()
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<C-p>', builtin.find_files, { desc = 'Telescope find files' })
|
||||
vim.keymap.set('n', '<C-g>', builtin.live_grep, { desc = 'Telescope live grep' })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope-ui-select.nvim",
|
||||
config = function()
|
||||
require("telescope").setup {
|
||||
extensions = {
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown {}
|
||||
}
|
||||
}
|
||||
}
|
||||
require("telescope").load_extension("ui-select")
|
||||
end,
|
||||
}
|
||||
}
|
13
lua/plugins/treesitter.lua
Normal file
13
lua/plugins/treesitter.lua
Normal file
|
@ -0,0 +1,13 @@
|
|||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
dependencies = {},
|
||||
opts = {
|
||||
auto_install = true,
|
||||
ensure_installed = { "lua" },
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -20,11 +20,6 @@ return {
|
|||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
opts = function()
|
||||
return require "config.plugins.treesitter"
|
||||
end,
|
||||
config = function(_, opts)
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
end,
|
||||
opts = {}
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue