formatting

This commit is contained in:
Kasper Juul Hermansen 2022-10-13 14:01:18 +02:00
parent 4399f2c45e
commit 2eb9117efa
Signed by: kjuulh
GPG Key ID: 57B6E1465221F912

View File

@ -89,7 +89,7 @@ local config = {
bg = "#1e222a", bg = "#1e222a",
}, },
highlights = function(hl) -- or a function that returns a new table of colors to set highlights = function(hl) -- or a function that returns a new table of colors to set
local C = require("default_theme.colors") local C = require "default_theme.colors"
hl.Normal = { fg = C.fg, bg = C.bg } hl.Normal = { fg = C.fg, bg = C.bg }
@ -205,16 +205,14 @@ local config = {
{ {
"nvim-telescope/telescope-file-browser.nvim", "nvim-telescope/telescope-file-browser.nvim",
after = "telescope.nvim", after = "telescope.nvim",
config = function() config = function() require("telescope").load_extension "file_browser" end,
require("telescope").load_extension("file_browser")
end,
}, },
{ {
"ahmedkhalf/project.nvim", "ahmedkhalf/project.nvim",
after = "telescope.nvim", after = "telescope.nvim",
config = function() config = function()
require("project_nvim").setup({ require("project_nvim").setup {
-- Manual mode doesn't automatically change your root directory, so you have -- Manual mode doesn't automatically change your root directory, so you have
-- the option to manually do so using `:ProjectRoot` command. -- the option to manually do so using `:ProjectRoot` command.
manual_mode = false, manual_mode = false,
@ -252,9 +250,9 @@ local config = {
-- Path where project.nvim will store the project history for use in -- Path where project.nvim will store the project history for use in
-- telescope -- telescope
datapath = vim.fn.stdpath("data"), datapath = vim.fn.stdpath "data",
}) }
require("telescope").load_extension("projects") require("telescope").load_extension "projects"
end, end,
}, },
{ {
@ -265,9 +263,7 @@ local config = {
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
"kyazdani42/nvim-web-devicons", "kyazdani42/nvim-web-devicons",
}, },
config = function() config = function() require("octo").setup() end,
require("octo").setup()
end,
}, },
-- You can disable default plugins as follows: -- You can disable default plugins as follows:
-- ["goolord/alpha-nvim"] = { disable = true }, -- ["goolord/alpha-nvim"] = { disable = true },
@ -294,7 +290,7 @@ local config = {
-- All other entries override the require("<key>").setup({...}) call for default plugins -- All other entries override the require("<key>").setup({...}) call for default plugins
["null-ls"] = function(config) -- overrides `require("null-ls").setup(config)` ["null-ls"] = function(config) -- overrides `require("null-ls").setup(config)`
-- config variable is the default configuration table for the setup function call -- config variable is the default configuration table for the setup function call
local null_ls = require("null-ls") local null_ls = require "null-ls"
-- Check supported formatters and linters -- Check supported formatters and linters
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting -- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting
@ -303,9 +299,9 @@ local config = {
-- Set a formatter -- Set a formatter
null_ls.builtins.formatting.stylua, null_ls.builtins.formatting.stylua,
null_ls.builtins.formatting.prettier, null_ls.builtins.formatting.prettier,
null_ls.builtins.formatting.deno_fmt.with({ null_ls.builtins.formatting.deno_fmt.with {
filetypes = { "markdown" }, filetypes = { "markdown" },
}), },
} }
return config -- return final config table return config -- return final config table
end, end,