LunarVim/lua/default-config.lua

196 lines
6 KiB
Lua
Raw Normal View History

2021-07-05 03:14:01 +02:00
CONFIG_PATH = vim.fn.stdpath "config"
DATA_PATH = vim.fn.stdpath "data"
CACHE_PATH = vim.fn.stdpath "cache"
TERMINAL = vim.fn.expand "$TERMINAL"
2021-07-09 07:37:03 +02:00
USER = vim.fn.expand "$USER"
2021-06-28 06:36:29 +02:00
O = {
keys = {
leader_key = "space",
},
2021-07-09 08:09:26 +02:00
colorscheme = "spacegray",
line_wrap_cursor_movement = true,
2021-07-05 03:14:01 +02:00
transparent_window = false,
2021-07-10 08:38:25 +02:00
format_on_save = true,
2021-07-17 00:30:38 +02:00
lint_on_save = true,
2021-07-13 23:05:35 +02:00
vsnip_dir = vim.fn.stdpath "config" .. "/snippets",
2021-06-28 06:36:29 +02:00
2021-07-10 09:19:32 +02:00
default_options = {
backup = false, -- creates a backup file
clipboard = "unnamedplus", -- allows neovim to access the system clipboard
cmdheight = 2, -- more space in the neovim command line for displaying messages
colorcolumn = "99999", -- fixes indentline for now
completeopt = { "menuone", "noselect" },
conceallevel = 0, -- so that `` is visible in markdown files
fileencoding = "utf-8", -- the encoding written to a file
foldmethod = "manual", -- folding, set to "expr" for treesitter based foloding
foldexpr = "", -- set to "nvim_treesitter#foldexpr()" for treesitter based folding
2021-07-10 09:19:32 +02:00
guifont = "monospace:h17", -- the font used in graphical neovim applications
hidden = true, -- required to keep multiple buffers and open multiple buffers
2021-07-15 06:42:17 +02:00
hlsearch = true, -- highlight all matches on previous search pattern
2021-07-10 09:19:32 +02:00
ignorecase = true, -- ignore case in search patterns
mouse = "a", -- allow the mouse to be used in neovim
pumheight = 10, -- pop up menu height
showmode = false, -- we don't need to see things like -- INSERT -- anymore
showtabline = 2, -- always show tabs
smartcase = true, -- smart case
smartindent = true, -- make indenting smarter again
splitbelow = true, -- force all horizontal splits to go below current window
splitright = true, -- force all vertical splits to go to the right of current window
swapfile = false, -- creates a swapfile
termguicolors = true, -- set term gui colors (most terminals support this)
timeoutlen = 100, -- time to wait for a mapped sequence to complete (in milliseconds)
title = true, -- set the title of window to the value of the titlestring
-- opt.titlestring = "%<%F%=%l/%L - nvim" -- what the title of the window will be set to
undodir = CACHE_PATH .. "/undo", -- set an undo directory
undofile = true, -- enable persisten undo
updatetime = 300, -- faster completion
writebackup = false, -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited
expandtab = true, -- convert tabs to spaces
shiftwidth = 2, -- the number of spaces inserted for each indentation
tabstop = 2, -- insert 2 spaces for a tab
cursorline = true, -- highlight the current line
number = true, -- set numbered lines
relativenumber = false, -- set relative numbered lines
numberwidth = 4, -- set number column width to 2 {default 4}
signcolumn = "yes", -- always show the sign column, otherwise it would shift the text each time
wrap = false, -- display lines as one long line
spell = false,
spelllang = "en",
scrolloff = 8, -- is one of my fav
sidescrolloff = 8,
2021-07-10 09:19:32 +02:00
},
2021-07-16 02:54:25 +02:00
lsp = {
diagnostics = {
virtual_text = {
prefix = "",
spacing = 0,
},
signs = true,
underline = true,
},
2021-07-17 05:22:02 +02:00
document_highlight = true,
popup_border = "single",
default_keybinds = true,
2021-07-16 02:54:25 +02:00
},
disabled_built_ins = {
"netrw",
"netrwPlugin",
"netrwSettings",
"netrwFileHandlers",
"gzip",
"zip",
"zipPlugin",
"tar",
"tarPlugin", -- 'man',
"getscript",
"getscriptPlugin",
"vimball",
"vimballPlugin",
"2html_plugin",
"logipat",
"rrhelper",
"spellfile_plugin",
-- 'matchit', 'matchparen', 'shada_plugin',
},
2021-07-13 03:11:43 +02:00
plugin = {},
-- TODO: refactor for tree
2021-07-10 08:38:25 +02:00
auto_close_tree = 0,
nvim_tree_disable_netrw = 0,
database = { save_location = "~/.config/lunarvim_db", auto_execute = 1 },
2021-06-28 06:36:29 +02:00
-- TODO: just using mappings (leader mappings)
2021-07-07 03:42:26 +02:00
user_which_key = {},
user_plugins = {
2021-07-05 21:35:06 +02:00
-- use lv-config.lua for this not put here
2021-07-05 03:14:01 +02:00
},
2021-06-28 08:37:33 +02:00
2021-07-05 20:49:07 +02:00
user_autocommands = {
{ "FileType", "qf", "set nobuflisted" },
},
2021-07-13 06:48:37 +02:00
formatters = {
filetype = {},
},
-- TODO move all of this into lang specific files, only require when using
2021-07-05 03:14:01 +02:00
lang = {
efm = {},
2021-07-13 06:48:37 +02:00
emmet = { active = false },
svelte = {},
tailwindcss = {
active = false,
filetypes = {
"html",
"css",
"scss",
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
2021-07-05 03:14:01 +02:00
},
},
tsserver = {
2021-07-11 15:36:35 +02:00
-- @usage can be 'eslint' or 'eslint_d'
linter = "",
2021-07-05 03:14:01 +02:00
diagnostics = {
virtual_text = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
formatter = {
exe = "prettier",
args = {},
},
2021-07-05 03:14:01 +02:00
},
},
2021-07-06 04:57:00 +02:00
}
2021-07-13 03:59:16 +02:00
require "core.status_colors"
2021-07-13 01:30:07 +02:00
require("core.gitsigns").config()
2021-07-13 03:11:43 +02:00
require("core.compe").config()
require("core.dashboard").config()
require("core.dap").config()
2021-07-15 05:15:12 +02:00
require("core.terminal").config()
2021-07-13 03:11:43 +02:00
require("core.zen").config()
require("core.telescope").config()
require("core.treesitter").config()
require("core.which-key").config()
require("core.nvimtree").config()
require("lang.clang").config()
2021-07-15 03:14:25 +02:00
require("lang.cmake").config()
require("lang.css").config()
require("lang.dart").config()
require("lang.dockerfile").config()
require("lang.elixir").config()
require("lang.elm").config()
require("lang.go").config()
require("lang.graphql").config()
require("lang.html").config()
require("lang.java").config()
require("lang.json").config()
require("lang.kotlin").config()
require("lang.lua").config()
require("lang.php").config()
require("lang.python").config()
2021-07-18 19:56:51 +02:00
require("lang.r").config()
2021-07-15 03:14:25 +02:00
require("lang.ruby").config()
require("lang.rust").config()
require("lang.sh").config()
2021-07-18 19:56:31 +02:00
require("lang.scala").config()
2021-07-18 01:11:26 +02:00
require("lang.svelte").config()
2021-07-18 19:56:31 +02:00
require("lang.swift").config()
2021-07-15 03:14:25 +02:00
require("lang.terraform").config()
require("lang.tex").config()
require("lang.vim").config()
require("lang.vue").config()
2021-07-15 03:14:25 +02:00
require("lang.yaml").config()
require("lang.zig").config()