Fix null-ls
This commit is contained in:
parent
a267b027d6
commit
0d7bcd581d
303
lua/plugins.lua
303
lua/plugins.lua
@ -1,19 +1,21 @@
|
|||||||
return require('packer').startup(function(use)
|
return require("packer").startup(function(use)
|
||||||
use { 'wbthomason/packer.nvim' }
|
use({ "wbthomason/packer.nvim" })
|
||||||
|
|
||||||
-- core UI
|
-- core UI
|
||||||
use({
|
use({
|
||||||
'ellisonleao/gruvbox.nvim',
|
"ellisonleao/gruvbox.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd('colorscheme gruvbox')
|
vim.cmd("colorscheme gruvbox")
|
||||||
end
|
end,
|
||||||
|
})
|
||||||
|
use({ "nvim-tree/nvim-web-devicons" })
|
||||||
|
use({
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
after = { "nvim-web-devicons" },
|
||||||
|
config = function()
|
||||||
|
require("plugins.statusline")
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
use { 'kyazdani42/nvim-web-devicons' }
|
|
||||||
use {
|
|
||||||
'nvim-lualine/lualine.nvim',
|
|
||||||
after = { 'nvim-web-devicons' },
|
|
||||||
config = function() require 'plugins.statusline' end
|
|
||||||
}
|
|
||||||
-- use {
|
-- use {
|
||||||
-- 'romgrk/barbar.nvim',
|
-- 'romgrk/barbar.nvim',
|
||||||
-- requires = {'kyazdani42/nvim-web-devicons'},
|
-- requires = {'kyazdani42/nvim-web-devicons'},
|
||||||
@ -23,130 +25,155 @@ return require('packer').startup(function(use)
|
|||||||
-- }
|
-- }
|
||||||
|
|
||||||
-- lsp stuff
|
-- lsp stuff
|
||||||
use {
|
use({
|
||||||
'neovim/nvim-lspconfig',
|
"neovim/nvim-lspconfig",
|
||||||
after = { "mason-lspconfig.nvim", "null-ls.nvim" },
|
after = { "mason-lspconfig.nvim", "null-ls.nvim" },
|
||||||
config = function() require 'plugins.lsp' end
|
config = function()
|
||||||
}
|
require("plugins.lsp")
|
||||||
use { 'williamboman/mason-lspconfig.nvim', after = 'mason.nvim' }
|
end,
|
||||||
use { 'hrsh7th/cmp-nvim-lsp', after = 'nvim-lspconfig' }
|
})
|
||||||
use {
|
use({ "williamboman/mason-lspconfig.nvim", after = "mason.nvim" })
|
||||||
'ray-x/lsp_signature.nvim',
|
use({ "hrsh7th/cmp-nvim-lsp", after = "nvim-lspconfig" })
|
||||||
after = 'nvim-lspconfig',
|
use({
|
||||||
config = function() require 'plugins.lsp-signature' end
|
"ray-x/lsp_signature.nvim",
|
||||||
}
|
after = {"nvim-cmp"},
|
||||||
|
config = function()
|
||||||
|
require("plugins.lsp-signature")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
-- tree sitter
|
-- tree sitter modules and tree sitter
|
||||||
use {
|
use({
|
||||||
'nvim-treesitter/nvim-treesitter',
|
"nvim-treesitter/nvim-treesitter",
|
||||||
event = 'UIEnter',
|
requires = {
|
||||||
config = function() require 'plugins.treesitter' end,
|
{
|
||||||
run = ':TSUpdate'
|
"HiPhish/nvim-ts-rainbow2",
|
||||||
}
|
after = { "nvim-treesitter" },
|
||||||
|
config = function()
|
||||||
|
require("plugins.treesitter")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
event = "BufEnter",
|
||||||
|
run = ":TSUpdate",
|
||||||
|
})
|
||||||
|
|
||||||
-- completer
|
-- completer
|
||||||
use {
|
use({
|
||||||
'L3MON4D3/LuaSnip',
|
"L3MON4D3/LuaSnip",
|
||||||
event = 'UIEnter',
|
event = "UIEnter",
|
||||||
requires = { 'rafamadriz/friendly-snippets' }
|
requires = { "rafamadriz/friendly-snippets" },
|
||||||
}
|
})
|
||||||
use {
|
use({
|
||||||
'hrsh7th/nvim-cmp',
|
"hrsh7th/nvim-cmp",
|
||||||
event = 'InsertEnter',
|
event = "InsertEnter",
|
||||||
after = { 'LuaSnip', 'cmp-nvim-lsp', 'nvim-treesitter' },
|
after = { "LuaSnip", "cmp-nvim-lsp", "nvim-treesitter" },
|
||||||
config = function() require 'plugins.cmp' end,
|
config = function()
|
||||||
|
require("plugins.cmp")
|
||||||
|
end,
|
||||||
requires = {
|
requires = {
|
||||||
-- local
|
-- local
|
||||||
{ 'hrsh7th/cmp-cmdline', after = 'nvim-cmp' },
|
{ "hrsh7th/cmp-cmdline", after = "nvim-cmp" },
|
||||||
{ 'hrsh7th/cmp-buffer', after = 'nvim-cmp' },
|
{ "hrsh7th/cmp-buffer", after = "nvim-cmp" },
|
||||||
{ 'hrsh7th/cmp-path', after = 'nvim-cmp' }, {
|
{ "hrsh7th/cmp-path", after = "nvim-cmp" },
|
||||||
'petertriho/cmp-git',
|
{
|
||||||
after = 'nvim-cmp',
|
"petertriho/cmp-git",
|
||||||
config = function() require("cmp_git").setup() end
|
after = "nvim-cmp",
|
||||||
}, { 'delphinus/cmp-ctags', after = 'nvim-cmp' }, -- end
|
config = function()
|
||||||
|
require("cmp_git").setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "delphinus/cmp-ctags", after = "nvim-cmp" }, -- end
|
||||||
-- lsp
|
-- lsp
|
||||||
{ 'hrsh7th/cmp-nvim-lsp-document-symbol', after = 'nvim-cmp' }, -- TS
|
{ "hrsh7th/cmp-nvim-lsp-document-symbol", after = "nvim-cmp" }, -- TS
|
||||||
{ 'ray-x/cmp-treesitter', after = 'nvim-cmp' }, -- end
|
{ "ray-x/cmp-treesitter", after = "nvim-cmp" }, -- end
|
||||||
-- Snip
|
-- Snip
|
||||||
{ 'saadparwaiz1/cmp_luasnip', after = { 'nvim-cmp', 'LuaSnip' } },
|
{ "saadparwaiz1/cmp_luasnip", after = { "nvim-cmp", "LuaSnip" } },
|
||||||
}
|
},
|
||||||
}
|
})
|
||||||
|
|
||||||
-- formating and editing
|
-- formating and editing
|
||||||
use { "williamboman/mason.nvim", event = 'BufEnter' }
|
use({ "williamboman/mason.nvim", event = "BufEnter" })
|
||||||
use {
|
use({
|
||||||
'windwp/nvim-autopairs',
|
"windwp/nvim-autopairs",
|
||||||
after = 'nvim-cmp',
|
after = "nvim-cmp",
|
||||||
config = function() require('plugins.nvim-autopairs') end
|
config = function()
|
||||||
}
|
require("plugins.nvim-autopairs")
|
||||||
use {
|
end,
|
||||||
|
})
|
||||||
|
use({
|
||||||
"jose-elias-alvarez/null-ls.nvim",
|
"jose-elias-alvarez/null-ls.nvim",
|
||||||
requires = { "nvim-lua/plenary.nvim" },
|
requires = { "nvim-lua/plenary.nvim" },
|
||||||
event = 'BufEnter'
|
event = "BufEnter",
|
||||||
}
|
})
|
||||||
use {
|
use({
|
||||||
"jay-babu/mason-null-ls.nvim",
|
"jay-babu/mason-null-ls.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require 'plugins.null-ls'
|
require("plugins.null-ls")
|
||||||
end,
|
end,
|
||||||
after = { "mason.nvim", "null-ls.nvim" }
|
after = { "mason.nvim", "null-ls.nvim" },
|
||||||
}
|
})
|
||||||
use {
|
use({
|
||||||
'mattn/emmet-vim',
|
"mattn/emmet-vim",
|
||||||
ft = { 'html', 'htmldjango', 'css', 'markdown' },
|
ft = { "html", "htmldjango", "css", "markdown" },
|
||||||
setup = function() require 'plugins.emmet' end
|
setup = function()
|
||||||
}
|
require("plugins.emmet")
|
||||||
use { 'machakann/vim-sandwich', event = 'UIEnter' }
|
end,
|
||||||
|
})
|
||||||
|
use({ "machakann/vim-sandwich", event = "UIEnter" })
|
||||||
|
|
||||||
use {
|
use({
|
||||||
'numToStr/Comment.nvim',
|
"numToStr/Comment.nvim",
|
||||||
event = 'UIEnter',
|
event = "UIEnter",
|
||||||
config = function() require('Comment').setup() end
|
config = function()
|
||||||
}
|
require("Comment").setup()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
-- navigation
|
-- navigation
|
||||||
use {
|
use({
|
||||||
'andymass/vim-matchup',
|
"andymass/vim-matchup",
|
||||||
after = 'nvim-treesitter',
|
after = "nvim-treesitter",
|
||||||
config = function() require 'plugins.matchup' end
|
|
||||||
}
|
|
||||||
use {
|
|
||||||
'nvim-telescope/telescope.nvim',
|
|
||||||
event = 'UIEnter',
|
|
||||||
requires = { 'nvim-lua/plenary.nvim' },
|
|
||||||
config = function() require 'plugins.telescope' end
|
|
||||||
}
|
|
||||||
use { 'preservim/tagbar', cmd = 'TagbarToggle' }
|
|
||||||
use {
|
|
||||||
'phaazon/hop.nvim',
|
|
||||||
event = 'UIEnter',
|
|
||||||
as = 'hop',
|
|
||||||
config = function()
|
config = function()
|
||||||
require 'hop'.setup { keys = 'etovxqpdygfblzhckisuran' }
|
require("plugins.matchup")
|
||||||
end
|
end,
|
||||||
}
|
})
|
||||||
|
use({
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
event = "UIEnter",
|
||||||
|
requires = { "nvim-lua/plenary.nvim" },
|
||||||
|
config = function()
|
||||||
|
require("plugins.telescope")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
use({ "preservim/tagbar", cmd = "TagbarToggle" })
|
||||||
|
use({
|
||||||
|
"phaazon/hop.nvim",
|
||||||
|
event = "UIEnter",
|
||||||
|
as = "hop",
|
||||||
|
config = function()
|
||||||
|
require("hop").setup({ keys = "etovxqpdygfblzhckisuran" })
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
-- eye-candy
|
-- eye-candy
|
||||||
use {
|
use({
|
||||||
'eandrju/cellular-automaton.nvim',
|
"eandrju/cellular-automaton.nvim",
|
||||||
cmd = "CellularAutomaton"
|
cmd = "CellularAutomaton",
|
||||||
}
|
})
|
||||||
use {
|
use({
|
||||||
'lewis6991/gitsigns.nvim',
|
"lewis6991/gitsigns.nvim",
|
||||||
event = 'UIEnter',
|
event = "UIEnter",
|
||||||
requires = { 'nvim-lua/plenary.nvim' },
|
requires = { "nvim-lua/plenary.nvim" },
|
||||||
config = function() require 'plugins.gitsigns' end
|
|
||||||
}
|
|
||||||
use {
|
|
||||||
'p00f/nvim-ts-rainbow',
|
|
||||||
after = 'nvim-treesitter',
|
|
||||||
config = function() require 'plugins.nvim-ts-rainbow' end
|
|
||||||
}
|
|
||||||
use {
|
|
||||||
'nvim-treesitter/nvim-treesitter-context',
|
|
||||||
after = 'nvim-treesitter',
|
|
||||||
config = function()
|
config = function()
|
||||||
require 'treesitter-context'.setup {
|
require("plugins.gitsigns")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
use({
|
||||||
|
"nvim-treesitter/nvim-treesitter-context",
|
||||||
|
after = "nvim-treesitter",
|
||||||
|
config = function()
|
||||||
|
require("treesitter-context").setup({
|
||||||
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
|
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
|
||||||
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
|
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
|
||||||
patterns = {
|
patterns = {
|
||||||
@ -156,29 +183,39 @@ return require('packer').startup(function(use)
|
|||||||
-- By setting the 'default' entry below, you can control which nodes you want to
|
-- By setting the 'default' entry below, you can control which nodes you want to
|
||||||
-- appear in the context window.
|
-- appear in the context window.
|
||||||
default = {
|
default = {
|
||||||
'class', 'function', 'method', 'for', -- These won't appear in the context
|
"class",
|
||||||
'while', 'if', 'switch', 'case'
|
"function",
|
||||||
}
|
"method",
|
||||||
}
|
"for", -- These won't appear in the context
|
||||||
}
|
"while",
|
||||||
end
|
"if",
|
||||||
}
|
"switch",
|
||||||
use {
|
"case",
|
||||||
'winston0410/range-highlight.nvim',
|
},
|
||||||
event = 'CmdlineEnter',
|
},
|
||||||
config = function() require('range-highlight').setup {} end,
|
})
|
||||||
requires = 'winston0410/cmd-parser.nvim'
|
end,
|
||||||
}
|
})
|
||||||
use {
|
use({
|
||||||
'norcalli/nvim-colorizer.lua',
|
"winston0410/range-highlight.nvim",
|
||||||
event = 'BufEnter',
|
event = "CmdlineEnter",
|
||||||
config = function() require 'plugins.nvim-colorizer' end
|
config = function()
|
||||||
}
|
require("range-highlight").setup({})
|
||||||
|
end,
|
||||||
|
requires = "winston0410/cmd-parser.nvim",
|
||||||
|
})
|
||||||
|
use({
|
||||||
|
"norcalli/nvim-colorizer.lua",
|
||||||
|
event = "BufEnter",
|
||||||
|
config = function()
|
||||||
|
require("plugins.nvim-colorizer")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
-- integrations
|
-- integrations
|
||||||
use { 'tpope/vim-fugitive', cmd = 'G' }
|
use({ "tpope/vim-fugitive", cmd = "G" })
|
||||||
|
|
||||||
-- fixes and misc. stuff
|
-- fixes and misc. stuff
|
||||||
use { 'antoinemadec/FixCursorHold.nvim', event = 'UIEnter' }
|
use({ "antoinemadec/FixCursorHold.nvim", event = "UIEnter" })
|
||||||
end)
|
end)
|
||||||
-- vim:set shiftwidth=4 tabstop=4:
|
-- vim:set shiftwidth=4 tabstop=4:
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
require("mason").setup()
|
require("mason").setup()
|
||||||
require("mason-null-ls").setup({
|
require("mason-null-ls").setup({
|
||||||
|
ensure_installed = {
|
||||||
|
-- Opt to list sources here, when available in mason.
|
||||||
|
},
|
||||||
automatic_installation = false,
|
automatic_installation = false,
|
||||||
automatic_setup = true, -- Recommended, but optional
|
handlers = {},
|
||||||
})
|
})
|
||||||
require("null-ls").setup({
|
require("null-ls").setup({
|
||||||
sources = {
|
sources = {
|
||||||
-- Anything not supported by mason.
|
-- Anything not supported by mason.
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
require 'mason-null-ls'.setup_handlers() -- If `automatic_setup` is true.
|
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
require'nvim-treesitter.configs'.setup {
|
|
||||||
rainbow = {
|
|
||||||
enable = true,
|
|
||||||
extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
|
|
||||||
max_file_lines = 4096, -- Do not enable for files with more than n lines, int
|
|
||||||
termcolors = {"red", "yellow", "green", "blue"} -- table of colour name strings
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
|||||||
require'nvim-treesitter.configs'.setup {
|
local rainbow = require("ts-rainbow")
|
||||||
|
require("nvim-treesitter.configs").setup({
|
||||||
ensure_installed = { "lua" }, -- one of "all", "maintained" (parsers with maintainers), or a list of languages
|
ensure_installed = { "lua" }, -- one of "all", "maintained" (parsers with maintainers), or a list of languages
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true, -- false will disable the whole extension
|
enable = true, -- false will disable the whole extension
|
||||||
@ -7,7 +8,20 @@ require'nvim-treesitter.configs'.setup {
|
|||||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||||
-- Instead of true it can also be a list of languages
|
-- Instead of true it can also be a list of languages
|
||||||
additional_vim_regex_highlighting = true,
|
additional_vim_regex_highlighting = true,
|
||||||
use_languagetree = true
|
use_languagetree = true,
|
||||||
},
|
},
|
||||||
indent = {enable = true}
|
indent = { enable = true },
|
||||||
}
|
rainbow = {
|
||||||
|
enable = true,
|
||||||
|
strategy = rainbow.strategy['local'],
|
||||||
|
hlgroups = {
|
||||||
|
"TSRainbowYellow",
|
||||||
|
"TSRainbowBlue",
|
||||||
|
"TSRainbowOrange",
|
||||||
|
"TSRainbowGreen",
|
||||||
|
"TSRainbowViolet",
|
||||||
|
"TSRainbowCyan",
|
||||||
|
"TSRainbowRed",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user