null-ls functionality
This commit is contained in:
parent
43456e196f
commit
7223a95766
@ -56,8 +56,5 @@ map('', '<leader>w', ':HopWordAC<cr>', { silent = true })
|
||||
map('', '<leader>l', ':HopWordCurrentLine<cr>', { silent = true })
|
||||
|
||||
-- telescope stuff
|
||||
map('', '<leader>fd', ':Telescope fd<cr>',
|
||||
|
||||
|
||||
{ silent = true })
|
||||
map('', '<leader>fd', ':Telescope fd<cr>', { silent = true })
|
||||
map('', '<leader>tb', ':Telescope buffers<cr>', { silent = true })
|
||||
|
@ -25,7 +25,7 @@ return require('packer').startup(function(use)
|
||||
-- lsp stuff
|
||||
use {
|
||||
'neovim/nvim-lspconfig',
|
||||
after = "mason-lspconfig.nvim",
|
||||
after = { "mason-lspconfig.nvim", "null-ls.nvim" },
|
||||
config = function() require 'plugins.lsp' end
|
||||
}
|
||||
use { 'williamboman/mason-lspconfig.nvim', after = 'mason.nvim' }
|
||||
@ -68,7 +68,7 @@ return require('packer').startup(function(use)
|
||||
{ 'hrsh7th/cmp-nvim-lsp-document-symbol', after = 'nvim-cmp' }, -- TS
|
||||
{ 'ray-x/cmp-treesitter', after = 'nvim-cmp' }, -- end
|
||||
-- Snip
|
||||
{ 'saadparwaiz1/cmp_luasnip', after = { 'nvim-cmp', 'LuaSnip' } }
|
||||
{ 'saadparwaiz1/cmp_luasnip', after = { 'nvim-cmp', 'LuaSnip' } },
|
||||
}
|
||||
}
|
||||
|
||||
@ -81,11 +81,15 @@ return require('packer').startup(function(use)
|
||||
}
|
||||
use {
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
config = function()
|
||||
require('plugins.null-ls')
|
||||
end,
|
||||
requires = { "nvim-lua/plenary.nvim" },
|
||||
event = "CmdlineEnter"
|
||||
event = 'BufEnter'
|
||||
}
|
||||
use {
|
||||
"jay-babu/mason-null-ls.nvim",
|
||||
config = function()
|
||||
require 'plugins.null-ls'
|
||||
end,
|
||||
after = { "mason.nvim", "null-ls.nvim" }
|
||||
}
|
||||
use {
|
||||
'mattn/emmet-vim',
|
||||
@ -106,11 +110,6 @@ return require('packer').startup(function(use)
|
||||
after = 'nvim-treesitter',
|
||||
config = function() require 'plugins.matchup' end
|
||||
}
|
||||
use {
|
||||
'abecodes/tabout.nvim',
|
||||
config = function() require('tabout').setup {} end,
|
||||
after = { 'nvim-treesitter', 'nvim-autopairs', 'nvim-cmp' } -- if a completion plugin is using tabs load it before
|
||||
}
|
||||
use {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
event = 'UIEnter',
|
||||
|
@ -1,18 +1,12 @@
|
||||
local null_ls = require("null-ls")
|
||||
|
||||
-- builtins
|
||||
-- local code_actions = null_ls.builtins.code_actions
|
||||
local diagnostics = null_ls.builtins.diagnostics
|
||||
local formatting = null_ls.builtins.formatting
|
||||
local hover = null_ls.builtins.hover
|
||||
local completion = null_ls.builtins.completion
|
||||
|
||||
local sources = {
|
||||
code_actions,
|
||||
diagnostics,
|
||||
formatting,
|
||||
hover,
|
||||
completion
|
||||
require("mason").setup()
|
||||
require("mason-null-ls").setup({
|
||||
automatic_installation = false,
|
||||
automatic_setup = true, -- Recommended, but optional
|
||||
})
|
||||
require("null-ls").setup({
|
||||
sources = {
|
||||
-- Anything not supported by mason.
|
||||
}
|
||||
})
|
||||
|
||||
null_ls.setup({ sources = sources })
|
||||
require 'mason-null-ls'.setup_handlers() -- If `automatic_setup` is true.
|
||||
|
@ -2,7 +2,7 @@ local npairs = require('nvim-autopairs')
|
||||
|
||||
npairs.setup({map_bs = true, map_cr = true, map_c_w = true})
|
||||
|
||||
-- If you want insert `(` after select function or method item
|
||||
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
||||
local cmp = require('cmp')
|
||||
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
|
||||
-- -- If you want insert `(` after select function or method item
|
||||
-- local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
||||
-- local cmp = require('cmp')
|
||||
-- cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
|
||||
|
Loading…
Reference in New Issue
Block a user