fix require inside opts in null-ls

turns out you can't require() inside opts {}, it will error out, so just put it in config section
This commit is contained in:
Lucas Barbieri 2023-08-04 18:41:04 -03:00
parent 87cf319118
commit 5e5ba06d3c
2 changed files with 14 additions and 12 deletions

View File

@ -160,10 +160,7 @@ vim.o.completeopt = 'menuone,noselect'
-- NOTE: You should make sure your terminal supports this
vim.o.termguicolors = true
-- [[ Basic Keymaps ]]
-- Keymaps for better default experience
-- See `:help vim.keymap.set()`
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
-- Remap for dealing with word wrap
@ -171,7 +168,6 @@ vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = tr
vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
-- [[ Highlight on yank ]]
-- See `:help vim.highlight.on_yank()`
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
vim.api.nvim_create_autocmd('TextYankPost', {
callback = function()
@ -182,7 +178,6 @@ vim.api.nvim_create_autocmd('TextYankPost', {
})
-- [[ Configure Telescope ]]
-- See `:help telescope` and `:help telescope.setup()`
require('telescope').setup {
defaults = {
mappings = {
@ -370,5 +365,10 @@ mason_lspconfig.setup_handlers {
-- this is for my personal config, i cant bother seeing every TJ's default and changing it to my own
require("jabuxas")
vim.opt.tabstop = 2
vim.opt.softtabstop = 2
vim.opt.shiftwidth = 2
vim.opt.expandtab = true
-- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et

View File

@ -1,11 +1,13 @@
return {
"jose-elias-alvarez/null-ls.nvim",
opts = {
sources = {
require("null-ls").builtins.formatting.black.with({
extra_args = { "--line-length=80" }
}),
require("null-ls").builtins.formatting.prettierd
config = function()
require("null-ls").setup {
sources = {
require("null-ls").builtins.formatting.black.with({
extra_args = { "--line-length=80" }
}),
require("null-ls").builtins.formatting.prettierd
}
}
}
end
}