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:
parent
87cf319118
commit
5e5ba06d3c
10
init.lua
10
init.lua
@ -160,10 +160,7 @@ vim.o.completeopt = 'menuone,noselect'
|
|||||||
-- NOTE: You should make sure your terminal supports this
|
-- NOTE: You should make sure your terminal supports this
|
||||||
vim.o.termguicolors = true
|
vim.o.termguicolors = true
|
||||||
|
|
||||||
-- [[ Basic Keymaps ]]
|
|
||||||
|
|
||||||
-- Keymaps for better default experience
|
-- Keymaps for better default experience
|
||||||
-- See `:help vim.keymap.set()`
|
|
||||||
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
|
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
|
||||||
|
|
||||||
-- Remap for dealing with word wrap
|
-- 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 })
|
vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||||
|
|
||||||
-- [[ Highlight on yank ]]
|
-- [[ Highlight on yank ]]
|
||||||
-- See `:help vim.highlight.on_yank()`
|
|
||||||
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
|
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
|
||||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||||
callback = function()
|
callback = function()
|
||||||
@ -182,7 +178,6 @@ vim.api.nvim_create_autocmd('TextYankPost', {
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- [[ Configure Telescope ]]
|
-- [[ Configure Telescope ]]
|
||||||
-- See `:help telescope` and `:help telescope.setup()`
|
|
||||||
require('telescope').setup {
|
require('telescope').setup {
|
||||||
defaults = {
|
defaults = {
|
||||||
mappings = {
|
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
|
-- this is for my personal config, i cant bother seeing every TJ's default and changing it to my own
|
||||||
require("jabuxas")
|
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`
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
-- vim: ts=2 sts=2 sw=2 et
|
-- vim: ts=2 sts=2 sw=2 et
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
return {
|
return {
|
||||||
"jose-elias-alvarez/null-ls.nvim",
|
"jose-elias-alvarez/null-ls.nvim",
|
||||||
opts = {
|
config = function()
|
||||||
sources = {
|
require("null-ls").setup {
|
||||||
require("null-ls").builtins.formatting.black.with({
|
sources = {
|
||||||
extra_args = { "--line-length=80" }
|
require("null-ls").builtins.formatting.black.with({
|
||||||
}),
|
extra_args = { "--line-length=80" }
|
||||||
require("null-ls").builtins.formatting.prettierd
|
}),
|
||||||
|
require("null-ls").builtins.formatting.prettierd
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
end
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user