Merge branch 'ChristianChiarulli:master' into master

This commit is contained in:
Jacek Kiedrowski 2021-07-05 23:26:25 +01:00 committed by GitHub
commit 5b49774744
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 81 additions and 350 deletions

View file

@ -18,14 +18,3 @@ require("lspconfig").clangd.setup {
}), }),
}, },
} }
if O.lang.clang.autoformat then
require("lv-utils").define_augroups {
_clang_autoformat = {
{ "BufWritePre *.c lua vim.lsp.buf.formatting_sync(nil,1000)" },
{ "BufWritePre *.h lua vim.lsp.buf.formatting_sync(nil,1000)" },
{ "BufWritePre *.cpp lua vim.lsp.buf.formatting_sync(nil,1000)" },
{ "BufWritePre *.hpp lua vim.lsp.buf.formatting_sync(nil,1000)" },
},
}
end

View file

@ -6,17 +6,7 @@ require("lspconfig").gopls.setup {
on_attach = require("lsp").common_on_attach, on_attach = require("lsp").common_on_attach,
} }
if O.lang.go.autoformat then vim.opt_local.tabstop = 4
require("lv-utils").define_augroups { vim.opt_local.shiftwidth = 4
_go_format = { vim.opt_local.softtabstop = 4
{ "BufWritePre", "*.go", "lua vim.lsp.buf.formatting_sync(nil,1000)" }, vim.opt_local.expandtab = false
},
_go = {
-- Go generally requires Tabs instead of spaces.
{ "FileType", "go", "setlocal tabstop=4" },
{ "FileType", "go", "setlocal shiftwidth=4" },
{ "FileType", "go", "setlocal softtabstop=4" },
{ "FileType", "go", "setlocal noexpandtab" },
},
}
end

View file

@ -34,40 +34,5 @@ require("lspconfig").tsserver.setup {
}), }),
}, },
} }
require("lsp.ts-fmt-lint").setup() require("lsp.ts-fmt-lint").setup()
if O.lang.tsserver.autoformat then
require("lv-utils").define_augroups {
_javascript_autoformat = {
{
"BufWritePre",
"*.js",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
_javascriptreact_autoformat = {
{
"BufWritePre",
"*.jsx",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
_typescript_autoformat = {
{
"BufWritePre",
"*.ts",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
_typescriptreact_autoformat = {
{
"BufWritePre",
"*.tsx",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
}
end
vim.cmd "setl ts=2 sw=2" vim.cmd "setl ts=2 sw=2"

View file

@ -34,40 +34,5 @@ require("lspconfig").tsserver.setup {
}), }),
}, },
} }
require("lsp.ts-fmt-lint").setup() require("lsp.ts-fmt-lint").setup()
if O.lang.tsserver.autoformat then
require("lv-utils").define_augroups {
_javascript_autoformat = {
{
"BufWritePre",
"*.js",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
_javascriptreact_autoformat = {
{
"BufWritePre",
"*.jsx",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
_typescript_autoformat = {
{
"BufWritePre",
"*.ts",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
_typescriptreact_autoformat = {
{
"BufWritePre",
"*.tsx",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
}
end
vim.cmd "setl ts=2 sw=2" vim.cmd "setl ts=2 sw=2"

View file

@ -15,15 +15,3 @@ require("lspconfig").jsonls.setup {
}, },
}, },
} }
if O.lang.json.autoformat then
require("lv-utils").define_augroups {
_json_format = {
{
"BufWritePre",
"*.json",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
}
end

View file

@ -40,34 +40,3 @@ if O.lang.lua.autoformat then
}, },
} }
end end
local lua_arguments = {}
local luaFormat = {
formatCommand = "lua-format -i --no-keep-simple-function-one-line --column-limit=80",
formatStdin = true,
}
local lua_fmt = {
formatCommand = "luafmt --indent-count 2 --line-width 120 --stdin",
formatStdin = true,
}
if O.lang.lua.formatter == "lua-format" then
table.insert(lua_arguments, luaFormat)
elseif O.lang.lua.formatter == "lua-fmt" then
table.insert(lua_arguments, lua_fmt)
end
require("lspconfig").efm.setup {
-- init_options = {initializationOptions},
cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" },
init_options = { documentFormatting = true, codeAction = false },
filetypes = { "lua" },
settings = {
rootMarkers = { ".git/" },
languages = {
lua = lua_arguments,
},
},
}

View file

@ -20,12 +20,6 @@ if O.lang.python.isort then
table.insert(python_arguments, isort) table.insert(python_arguments, isort)
end end
if O.lang.python.formatter == "yapf" then
table.insert(python_arguments, yapf)
elseif O.lang.python.formatter == "black" then
table.insert(python_arguments, black)
end
require("lspconfig").efm.setup { require("lspconfig").efm.setup {
-- init_options = {initializationOptions}, -- init_options = {initializationOptions},
cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" }, cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" },
@ -64,17 +58,6 @@ require("lspconfig").pyright.setup {
}, },
}, },
} }
if O.lang.python.autoformat then
require("lv-utils").define_augroups {
_python_autoformat = {
{
"BufWritePre",
"*.py",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
}
end
if O.plugin.debug.active and O.plugin.dap_install.active then if O.plugin.debug.active and O.plugin.dap_install.active then
local dap_install = require("dap-install") local dap_install = require("dap-install")

View file

@ -12,11 +12,3 @@ require("lspconfig").solargraph.setup {
}, },
filetypes = O.lang.ruby.filetypes, filetypes = O.lang.ruby.filetypes,
} }
if O.lang.ruby.autoformat then
require("lv-utils").define_augroups {
_ruby_format = {
{ "BufWritePre", "*.rb", "lua vim.lsp.buf.formatting_sync(nil,1000)" },
},
}
end

View file

@ -91,11 +91,3 @@ vim.api.nvim_exec(
]], ]],
true true
) )
if O.lang.rust.autoformat then
require("lv-utils").define_augroups {
_rust_format = {
{ "BufWritePre", "*.rs", "lua vim.lsp.buf.formatting_sync(nil,1000)" },
},
}
end

View file

@ -15,10 +15,6 @@ local shellcheck = {
lintFormats = { "%f:%l:%c: %trror: %m", "%f:%l:%c: %tarning: %m", "%f:%l:%c: %tote: %m" }, lintFormats = { "%f:%l:%c: %trror: %m", "%f:%l:%c: %tarning: %m", "%f:%l:%c: %tote: %m" },
} }
if O.lang.sh.formatter == "shfmt" then
table.insert(sh_arguments, shfmt)
end
if O.lang.sh.linter == "shellcheck" then if O.lang.sh.linter == "shellcheck" then
table.insert(sh_arguments, shellcheck) table.insert(sh_arguments, shellcheck)
end end

View file

@ -34,40 +34,5 @@ require("lspconfig").tsserver.setup {
}), }),
}, },
} }
require("lsp.ts-fmt-lint").setup() require("lsp.ts-fmt-lint").setup()
if O.lang.tsserver.autoformat then
require("lv-utils").define_augroups {
_javascript_autoformat = {
{
"BufWritePre",
"*.js",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
_javascriptreact_autoformat = {
{
"BufWritePre",
"*.jsx",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
_typescript_autoformat = {
{
"BufWritePre",
"*.ts",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
_typescriptreact_autoformat = {
{
"BufWritePre",
"*.tsx",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
}
end
vim.cmd "setl ts=2 sw=2" vim.cmd "setl ts=2 sw=2"

View file

@ -34,40 +34,5 @@ require("lspconfig").tsserver.setup {
}), }),
}, },
} }
require("lsp.ts-fmt-lint").setup() require("lsp.ts-fmt-lint").setup()
if O.lang.tsserver.autoformat then
require("lv-utils").define_augroups {
_javascript_autoformat = {
{
"BufWritePre",
"*.js",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
_javascriptreact_autoformat = {
{
"BufWritePre",
"*.jsx",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
_typescript_autoformat = {
{
"BufWritePre",
"*.ts",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
_typescriptreact_autoformat = {
{
"BufWritePre",
"*.tsx",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
}
end
vim.cmd "setl ts=2 sw=2" vim.cmd "setl ts=2 sw=2"

View file

@ -8,7 +8,6 @@ require("lspconfig").zls.setup {
} }
require("lv-utils").define_augroups { require("lv-utils").define_augroups {
_zig_autoformat = { _zig_autoformat = {
{ "BufWritePre", "*.zig", "lua vim.lsp.buf.formatting_sync(nil, 1000)" },
{ "BufEnter", "*.zig", ':lua vim.api.nvim_buf_set_option(0, "commentstring", "// %s")' }, { "BufEnter", "*.zig", ':lua vim.api.nvim_buf_set_option(0, "commentstring", "// %s")' },
}, },
} }

View file

@ -15,17 +15,11 @@ require("lspconfig").bashls.setup {
-- sh -- sh
local sh_arguments = {} local sh_arguments = {}
local shfmt = { formatCommand = "shfmt -ci -s -bn", formatStdin = true }
local shellcheck = { local shellcheck = {
LintCommand = "shellcheck -f gcc -x", LintCommand = "shellcheck -f gcc -x",
lintFormats = { "%f:%l:%c: %trror: %m", "%f:%l:%c: %tarning: %m", "%f:%l:%c: %tote: %m" }, lintFormats = { "%f:%l:%c: %trror: %m", "%f:%l:%c: %tarning: %m", "%f:%l:%c: %tote: %m" },
} }
if O.lang.sh.formatter == "shfmt" then
table.insert(sh_arguments, shfmt)
end
if O.lang.sh.linter == "shellcheck" then if O.lang.sh.linter == "shellcheck" then
table.insert(sh_arguments, shellcheck) table.insert(sh_arguments, shellcheck)
end end

View file

@ -12,3 +12,16 @@ require "lsp"
if O.lang.emmet.active then if O.lang.emmet.active then
require "lsp.emmet-ls" require "lsp.emmet-ls"
end end
-- autoformat
if O.format_on_save then
require("lv-utils").define_augroups {
autoformat = {
{
"BufWritePre",
"*",
[[try | undojoin | Neoformat | catch /^Vim\%((\a\+)\)\=:E790/ | finally | silent Neoformat | endtry]],
},
},
}
end

View file

@ -4,7 +4,7 @@ CACHE_PATH = vim.fn.stdpath "cache"
TERMINAL = vim.fn.expand "$TERMINAL" TERMINAL = vim.fn.expand "$TERMINAL"
O = { O = {
format_on_save = true,
auto_close_tree = 0, auto_close_tree = 0,
auto_complete = true, auto_complete = true,
colorscheme = "lunar", colorscheme = "lunar",
@ -33,7 +33,7 @@ O = {
}, },
lsp = { lsp = {
popup_border = "single" popup_border = "single",
}, },
database = { save_location = "~/.config/nvcode_db", auto_execute = 1 }, database = { save_location = "~/.config/nvcode_db", auto_execute = 1 },
@ -97,9 +97,6 @@ O = {
lang = { lang = {
python = { python = {
linter = "", linter = "",
-- @usage can be 'yapf', 'black'
formatter = "",
autoformat = false,
isort = false, isort = false,
diagnostics = { diagnostics = {
virtual_text = { spacing = 0, prefix = "" }, virtual_text = { spacing = 0, prefix = "" },
@ -116,9 +113,6 @@ O = {
sdk_path = "/usr/lib/dart/bin/snapshots/analysis_server.dart.snapshot", sdk_path = "/usr/lib/dart/bin/snapshots/analysis_server.dart.snapshot",
}, },
lua = { lua = {
-- @usage can be 'lua-format'
formatter = "",
autoformat = false,
diagnostics = { diagnostics = {
virtual_text = { spacing = 0, prefix = "" }, virtual_text = { spacing = 0, prefix = "" },
signs = true, signs = true,
@ -129,8 +123,6 @@ O = {
-- @usage can be 'shellcheck' -- @usage can be 'shellcheck'
linter = "", linter = "",
-- @usage can be 'shfmt' -- @usage can be 'shfmt'
formatter = "",
autoformat = false,
diagnostics = { diagnostics = {
virtual_text = { spacing = 0, prefix = "" }, virtual_text = { spacing = 0, prefix = "" },
signs = true, signs = true,
@ -140,9 +132,6 @@ O = {
tsserver = { tsserver = {
-- @usage can be 'eslint' -- @usage can be 'eslint'
linter = "", linter = "",
-- @usage can be 'prettier'
formatter = "",
autoformat = false,
diagnostics = { diagnostics = {
virtual_text = { spacing = 0, prefix = "" }, virtual_text = { spacing = 0, prefix = "" },
signs = true, signs = true,
@ -150,9 +139,6 @@ O = {
}, },
}, },
json = { json = {
-- @usage can be 'prettier'
formatter = "",
autoformat = false,
diagnostics = { diagnostics = {
virtual_text = { spacing = 0, prefix = "" }, virtual_text = { spacing = 0, prefix = "" },
signs = true, signs = true,
@ -178,7 +164,6 @@ O = {
}, },
cross_file_rename = true, cross_file_rename = true,
header_insertion = "never", header_insertion = "never",
autoformat = false, -- update this to true for enabling autoformat
}, },
ruby = { ruby = {
diagnostics = { diagnostics = {
@ -198,8 +183,6 @@ O = {
active = false, active = false,
}, },
linter = "", linter = "",
formatter = "",
autoformat = false,
diagnostics = { diagnostics = {
virtual_text = { spacing = 0, prefix = "" }, virtual_text = { spacing = 0, prefix = "" },
signs = true, signs = true,
@ -208,13 +191,9 @@ O = {
}, },
svelte = {}, svelte = {},
php = { php = {
format = {
braces = "psr12",
},
environment = { environment = {
php_version = "7.4", php_version = "7.4",
}, },
autoformat = false,
diagnostics = { diagnostics = {
virtual_text = { spacing = 0, prefix = "" }, virtual_text = { spacing = 0, prefix = "" },
signs = true, signs = true,
@ -233,8 +212,6 @@ O = {
cmake = {}, cmake = {},
java = {}, java = {},
css = { css = {
formatter = "",
autoformat = false,
virtual_text = true, virtual_text = true,
}, },
}, },
@ -263,6 +240,4 @@ O = {
}, },
footer = { "chrisatmachine.com" }, footer = { "chrisatmachine.com" },
}, },
} }

View file

@ -87,7 +87,7 @@ vim.api.nvim_set_keymap("n", "<leader>/", ":CommentToggle<CR>", { noremap = true
vim.api.nvim_set_keymap("v", "<leader>/", ":CommentToggle<CR>", { noremap = true, silent = true }) vim.api.nvim_set_keymap("v", "<leader>/", ":CommentToggle<CR>", { noremap = true, silent = true })
-- close buffer -- close buffer
vim.api.nvim_set_keymap("n", "<leader>c", ":bdelete!<CR>", { noremap = true, silent = true }) vim.api.nvim_set_keymap("n", "<leader>c", ":BufferClose<CR>", { noremap = true, silent = true })
-- TODO create entire treesitter section -- TODO create entire treesitter section
@ -121,14 +121,14 @@ local mappings = {
"sort BufferLines automatically by language", "sort BufferLines automatically by language",
}, },
}, },
p = { p = {
name = "Packer", name = "Packer",
c = {"<cmd>PackerCompile<cr>", "Compile"}, c = { "<cmd>PackerCompile<cr>", "Compile" },
i = {"<cmd>PackerInstall<cr>", "Install"}, i = { "<cmd>PackerInstall<cr>", "Install" },
r = {":luafile %<cr>", "Reload"}, r = { ":luafile %<cr>", "Reload" },
s = {"<cmd>PackerSync<cr>", "Sync"}, s = { "<cmd>PackerSync<cr>", "Sync" },
u = {"<cmd>PackerUpdate<cr>", "Update"} u = { "<cmd>PackerUpdate<cr>", "Update" },
}, },
-- diagnostics vanilla nvim -- diagnostics vanilla nvim
-- -- diagnostic -- -- diagnostic
-- function lv_utils.get_all() -- function lv_utils.get_all()
@ -158,20 +158,20 @@ local mappings = {
-- " https://microsoft.github.io/debug-adapter-protocol/ -- " https://microsoft.github.io/debug-adapter-protocol/
-- " Debugging -- " Debugging
d = { d = {
name = "Debug", name = "Debug",
t = {"<cmd>lua require'dap'.toggle_breakpoint()<cr>", "Toggle Breakpoint"}, t = { "<cmd>lua require'dap'.toggle_breakpoint()<cr>", "Toggle Breakpoint" },
b = {"<cmd>lua require'dap'.step_back()<cr>", "Step Back"}, b = { "<cmd>lua require'dap'.step_back()<cr>", "Step Back" },
c = {"<cmd>lua require'dap'.continue()<cr>", "Continue"}, c = { "<cmd>lua require'dap'.continue()<cr>", "Continue" },
C = {"<cmd>lua require'dap'.run_to_cursor()<cr>", "Run To Cursor"}, C = { "<cmd>lua require'dap'.run_to_cursor()<cr>", "Run To Cursor" },
d = {"<cmd>lua require'dap'.disconnect()<cr>", "Disconnect"}, d = { "<cmd>lua require'dap'.disconnect()<cr>", "Disconnect" },
g = {"<cmd>lua require'dap'.session()<cr>", "Get Session"}, g = { "<cmd>lua require'dap'.session()<cr>", "Get Session" },
i = {"<cmd>lua require'dap'.step_into()<cr>", "Step Into"}, i = { "<cmd>lua require'dap'.step_into()<cr>", "Step Into" },
o = {"<cmd>lua require'dap'.step_over()<cr>", "Step Over"}, o = { "<cmd>lua require'dap'.step_over()<cr>", "Step Over" },
u = {"<cmd>lua require'dap'.step_out()<cr>", "Step Out"}, u = { "<cmd>lua require'dap'.step_out()<cr>", "Step Out" },
p = {"<cmd>lua require'dap'.pause.toggle()<cr>", "Pause"}, p = { "<cmd>lua require'dap'.pause.toggle()<cr>", "Pause" },
r = {"<cmd>lua require'dap'.repl.toggle()<cr>", "Toggle Repl"}, r = { "<cmd>lua require'dap'.repl.toggle()<cr>", "Toggle Repl" },
s = {"<cmd>lua require'dap'.continue()<cr>", "Start"}, s = { "<cmd>lua require'dap'.continue()<cr>", "Start" },
q = {"<cmd>lua require'dap'.stop()<cr>", "Quit"} q = { "<cmd>lua require'dap'.stop()<cr>", "Quit" },
}, },
g = { g = {
name = "Git", name = "Git",

View file

@ -32,7 +32,7 @@ return require("packer").startup(function(use)
-- TODO refactor all of this (for now it works, but yes I know it could be wrapped in a simpler function) -- TODO refactor all of this (for now it works, but yes I know it could be wrapped in a simpler function)
use { "neovim/nvim-lspconfig" } use { "neovim/nvim-lspconfig" }
use { "kabouzeid/nvim-lspinstall", cmd = "LspInstall" } use { "kabouzeid/nvim-lspinstall" }
-- Telescope -- Telescope
use { "nvim-lua/popup.nvim" } use { "nvim-lua/popup.nvim" }
use { "nvim-lua/plenary.nvim" } use { "nvim-lua/plenary.nvim" }
@ -66,6 +66,9 @@ return require("packer").startup(function(use)
-- Treesitter -- Treesitter
use { "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" } use { "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" }
-- Neoformat
use { "sbdchd/neoformat", event = "BufEnter" }
use { use {
"kyazdani42/nvim-tree.lua", "kyazdani42/nvim-tree.lua",
-- cmd = "NvimTreeToggle", -- cmd = "NvimTreeToggle",
@ -115,13 +118,21 @@ return require("packer").startup(function(use)
use { "glepnir/galaxyline.nvim" } use { "glepnir/galaxyline.nvim" }
use { use {
"akinsho/nvim-bufferline.lua", "romgrk/barbar.nvim",
config = function() config = function()
require("lv-bufferline").config() vim.api.nvim_set_keymap("n", "<TAB>", ":BufferNext<CR>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("n", "<S-TAB>", ":BufferPrevious<CR>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("n", "<S-x>", ":BufferClose<CR>", { noremap = true, silent = true })
end, end,
event = "BufRead", -- event = "BufRead",
} }
-- use {
-- "akinsho/nvim-bufferline.lua",
-- config = function() require("lv-bufferline").config() end,
-- event = "BufRead"
-- }
-- Extras, these do not load by default -- Extras, these do not load by default
-- Better motions -- Better motions
@ -221,7 +232,11 @@ return require("packer").startup(function(use)
vim.g.indentLine_enabled = 1 vim.g.indentLine_enabled = 1
vim.g.indent_blankline_char = "" vim.g.indent_blankline_char = ""
vim.g.indent_blankline_filetype_exclude = { "help", "terminal", "dashboard" } vim.g.indent_blankline_filetype_exclude = {
"help",
"terminal",
"dashboard",
}
vim.g.indent_blankline_buftype_exclude = { "terminal" } vim.g.indent_blankline_buftype_exclude = { "terminal" }
vim.g.indent_blankline_show_trailing_blankline_indent = false vim.g.indent_blankline_show_trailing_blankline_indent = false
@ -253,9 +268,14 @@ return require("packer").startup(function(use)
use { use {
"mfussenegger/nvim-dap", "mfussenegger/nvim-dap",
config = function() config = function()
require('dap') require "dap"
vim.fn.sign_define('DapBreakpoint', {text='', texthl='LspDiagnosticsSignError', linehl='', numhl=''}) vim.fn.sign_define("DapBreakpoint", {
require('dap').defaults.fallback.terminal_win_cmd = '50vsplit new' text = "",
texthl = "LspDiagnosticsSignError",
linehl = "",
numhl = "",
})
require("dap").defaults.fallback.terminal_win_cmd = "50vsplit new"
end, end,
disable = not O.plugin.debug.active, disable = not O.plugin.debug.active,
} }
@ -435,7 +455,7 @@ return require("packer").startup(function(use)
"typescript", "typescript",
"typescriptreact", "typescriptreact",
"typescript.tsx", "typescript.tsx",
} },
} }
-- use { -- use {
-- "jose-elias-alvarez/null-ls.nvim", -- "jose-elias-alvarez/null-ls.nvim",
@ -459,6 +479,7 @@ return require("packer").startup(function(use)
requires = "hrsh7th/nvim-compe", requires = "hrsh7th/nvim-compe",
disable = not O.plugin.tabnine.active, disable = not O.plugin.tabnine.active,
} }
for _, plugin in pairs(O.custom_plugins) do packer.use(plugin) end for _, plugin in pairs(O.custom_plugins) do
packer.use(plugin)
end
end) end)

View file

@ -1,13 +1,13 @@
--[[ --[[
O is the global options object O is the global options object
Formatters and linters should be Linters should be
filled in as strings with either filled in as strings with either
a global executable or a path to a global executable or a path to
an executable an executable
]] ]] -- THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT
-- THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT
-- general -- general
O.format_on_save = true
O.auto_complete = true O.auto_complete = true
O.colorscheme = "spacegray" O.colorscheme = "spacegray"
O.auto_close_tree = 0 O.auto_close_tree = 0
@ -22,7 +22,7 @@ O.transparent_window = false
-- TODO User Config for predefined plugins -- TODO User Config for predefined plugins
-- After changing plugin config exit and reopen LunarVim, Run :PackerInstall :PackerCompile -- After changing plugin config exit and reopen LunarVim, Run :PackerInstall :PackerCompile
O.bultin_plugin.hop.active = false O.plugin.hop.active = false
O.plugin.dial.active = false O.plugin.dial.active = false
O.plugin.dashboard.active = true O.plugin.dashboard.active = true
O.plugin.matchup.active = false O.plugin.matchup.active = false
@ -39,7 +39,7 @@ O.plugin.zen.active = false
-- if you don't want all the parsers change this to a table of the ones you want -- if you don't want all the parsers change this to a table of the ones you want
O.treesitter.ensure_installed = "all" O.treesitter.ensure_installed = "all"
O.treesitter.ignore_install = { "haskell" } O.treesitter.ignore_install = {"haskell"}
O.treesitter.highlight.enabled = true O.treesitter.highlight.enabled = true
O.lang.clang.diagnostics.virtual_text = true O.lang.clang.diagnostics.virtual_text = true
@ -47,13 +47,9 @@ O.lang.clang.diagnostics.signs = true
O.lang.clang.diagnostics.underline = true O.lang.clang.diagnostics.underline = true
-- python -- python
-- add things like O.python.formatter.yapf.exec_path
-- add things like O.python.linter.flake8.exec_path -- add things like O.python.linter.flake8.exec_path
-- add things like O.python.formatter.isort.exec_path
O.lang.python.formatter = "yapf"
-- O.python.linter = 'flake8' -- O.python.linter = 'flake8'
O.lang.python.isort = true O.lang.python.isort = true
O.lang.python.autoformat = true
O.lang.python.diagnostics.virtual_text = true O.lang.python.diagnostics.virtual_text = true
O.lang.python.diagnostics.signs = true O.lang.python.diagnostics.signs = true
O.lang.python.diagnostics.underline = true O.lang.python.diagnostics.underline = true
@ -61,40 +57,14 @@ O.lang.python.analysis.type_checking = "off"
O.lang.python.analysis.auto_search_paths = true O.lang.python.analysis.auto_search_paths = true
O.lang.python.analysis.use_library_code_types = true O.lang.python.analysis.use_library_code_types = true
-- lua
-- TODO look into stylua
O.lang.lua.formatter = "lua-format"
-- O.lua.formatter = 'lua-format'
O.lang.lua.autoformat = false
-- javascript -- javascript
O.lang.tsserver.formatter = "prettier"
O.lang.tsserver.linter = nil O.lang.tsserver.linter = nil
O.lang.tsserver.autoformat = true
-- json
O.lang.json.autoformat = true
-- ruby
O.lang.ruby.autoformat = true
-- go
O.lang.go.autoformat = true
-- rust
O.lang.rust.autoformat = true
-- clang
O.lang.clang.autoformat = false -- Set to true to enable auto-format in C/C++ files.
-- php -- php
O.lang.php.format.braces = "k&r" -- options: psr12, allman, k&r
O.lang.php.environment.php_version = "7.4" O.lang.php.environment.php_version = "7.4"
-- TODO: autoformat seems not to work at the moment
O.lang.php.autoformat = false
O.lang.php.diagnostics.signs = true O.lang.php.diagnostics.signs = true
O.lang.php.diagnostics.underline = true O.lang.php.diagnostics.underline = true
O.lang.php.filetypes = { "php", "phtml" } O.lang.php.filetypes = {"php", "phtml"}
-- Autocommands (https://neovim.io/doc/user/autocmd.html) -- Autocommands (https://neovim.io/doc/user/autocmd.html)
-- O.user_autocommands = {{ "BufWinEnter", "*", "echo \"hi again\""}} -- O.user_autocommands = {{ "BufWinEnter", "*", "echo \"hi again\""}}