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 = {
2021-07-10 08:38:25 +02:00
leader_key = " space " ,
2021-07-09 08:09:26 +02:00
colorscheme = " spacegray " ,
2021-07-11 10:00:15 +02:00
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-05 03:14:01 +02:00
vnsip_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
guifont = " monospace:h17 " , -- the font used in graphical neovim applications
hidden = true , -- required to keep multiple buffers and open multiple buffers
hlsearch = false , -- highlight all matches on previous search pattern
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
} ,
2021-07-10 23:34:20 +02:00
-- TODO: refactor for tree
2021-07-10 08:38:25 +02:00
auto_close_tree = 0 ,
nvim_tree_disable_netrw = 0 ,
2021-07-05 16:43:37 +02:00
lsp = {
2021-07-10 08:38:25 +02:00
document_highlight = true ,
2021-07-05 22:01:19 +02:00
popup_border = " single " ,
2021-07-05 16:43:37 +02:00
} ,
2021-07-10 08:38:25 +02:00
database = { save_location = " ~/.config/lunarvim_db " , auto_execute = 1 } ,
2021-06-28 06:36:29 +02:00
2021-07-05 03:14:01 +02:00
plugin = {
2021-07-05 21:35:06 +02:00
-- Builtins
2021-07-10 03:34:12 +02:00
diffview = { active = false } ,
2021-07-06 01:48:58 +02:00
ts_hintobjects = { active = false } ,
ts_textobjects = { active = false } ,
ts_textsubjects = { active = false } ,
2021-07-05 21:35:06 +02:00
telescope_project = { active = false } ,
indent_line = { active = false } ,
lush = { active = false } ,
} ,
2021-07-10 23:34:20 +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-05 03:14:01 +02:00
lang = {
2021-07-10 20:18:28 +02:00
cmake = {
formatter = {
exe = " clang-format " ,
args = { } ,
} ,
} ,
2021-07-08 18:58:22 +02:00
clang = {
2021-07-05 03:14:01 +02:00
diagnostics = {
virtual_text = { spacing = 0 , prefix = " " } ,
signs = true ,
underline = true ,
} ,
2021-07-08 18:58:22 +02:00
cross_file_rename = true ,
header_insertion = " never " ,
2021-07-10 20:18:28 +02:00
filetypes = { " c " , " cpp " , " objc " } ,
formatter = {
exe = " clang-format " ,
args = { } ,
} ,
2021-07-08 18:58:22 +02:00
} ,
css = {
virtual_text = true ,
2021-06-28 08:37:33 +02:00
} ,
2021-07-05 03:14:01 +02:00
dart = {
sdk_path = " /usr/lib/dart/bin/snapshots/analysis_server.dart.snapshot " ,
2021-07-10 20:18:28 +02:00
formatter = {
exe = " dart " ,
args = { " format " } ,
} ,
2021-06-28 06:36:29 +02:00
} ,
2021-07-08 18:58:22 +02:00
docker = { } ,
efm = { } ,
elm = { } ,
emmet = { active = true } ,
elixir = { } ,
graphql = { } ,
2021-07-10 20:18:28 +02:00
go = {
formatter = {
exe = " gofmt " ,
args = { } ,
} ,
} ,
2021-07-08 18:58:22 +02:00
html = { } ,
2021-07-09 07:37:03 +02:00
java = {
java_tools = {
active = false ,
} ,
} ,
2021-07-08 18:58:22 +02:00
json = {
2021-07-05 03:14:01 +02:00
diagnostics = {
virtual_text = { spacing = 0 , prefix = " " } ,
signs = true ,
underline = true ,
} ,
2021-07-10 20:18:28 +02:00
formatter = {
exe = " python " ,
args = { " -m " , " json.tool " } ,
} ,
2021-07-05 03:14:01 +02:00
} ,
2021-07-08 18:58:22 +02:00
kotlin = { } ,
latex = { } ,
lua = {
2021-07-05 03:14:01 +02:00
diagnostics = {
virtual_text = { spacing = 0 , prefix = " " } ,
signs = true ,
underline = true ,
} ,
2021-07-10 20:18:28 +02:00
formatter = {
exe = " stylua " ,
args = { " --stdin-filepath " , vim.api . nvim_buf_get_name ( 0 ) } ,
stdin = false ,
} ,
2021-07-05 03:14:01 +02:00
} ,
2021-07-08 18:58:22 +02:00
php = {
format = {
format = {
default = " psr12 " ,
} ,
} ,
environment = {
php_version = " 7.4 " ,
2021-07-05 03:14:01 +02:00
} ,
diagnostics = {
virtual_text = { spacing = 0 , prefix = " " } ,
signs = true ,
underline = true ,
} ,
2021-07-08 18:58:22 +02:00
filetypes = { " php " , " phtml " } ,
2021-07-10 20:18:28 +02:00
formatter = {
exe = " phpcbf " ,
args = { " --standard=PSR12 " , vim.api . nvim_buf_get_name ( 0 ) } ,
stdin = false ,
} ,
2021-07-05 03:14:01 +02:00
} ,
2021-07-08 18:58:22 +02:00
python = {
2021-07-11 10:42:55 +02:00
-- @usage can be flake8 or yapf
2021-07-08 18:58:22 +02:00
linter = " " ,
isort = false ,
2021-07-05 03:14:01 +02:00
diagnostics = {
virtual_text = { spacing = 0 , prefix = " " } ,
signs = true ,
underline = true ,
} ,
2021-07-08 18:58:22 +02:00
analysis = {
type_checking = " basic " ,
auto_search_paths = true ,
use_library_code_types = true ,
} ,
2021-07-10 20:18:28 +02:00
formatter = {
exe = " yapf " ,
args = { } ,
} ,
2021-07-05 03:14:01 +02:00
} ,
ruby = {
diagnostics = {
virtualtext = { spacing = 0 , prefix = " " } ,
signs = true ,
underline = true ,
} ,
filetypes = { " rb " , " erb " , " rakefile " , " ruby " } ,
2021-07-10 20:18:28 +02:00
formatter = {
exe = " rufo " ,
args = { " -x " } ,
} ,
2021-07-05 03:14:01 +02:00
} ,
rust = {
rust_tools = {
active = false ,
2021-07-08 18:58:22 +02:00
parameter_hints_prefix = " <- " ,
other_hints_prefix = " => " , -- prefix for all the other hints (type, chaining)
2021-07-05 03:14:01 +02:00
} ,
2021-07-11 10:42:55 +02:00
-- @usage can be clippy
2021-07-10 20:18:28 +02:00
formatter = {
exe = " rustfmt " ,
args = { " --emit=stdout " } ,
} ,
2021-07-05 03:14:01 +02:00
linter = " " ,
diagnostics = {
virtual_text = { spacing = 0 , prefix = " " } ,
signs = true ,
underline = true ,
} ,
} ,
2021-07-08 18:58:22 +02:00
sh = {
-- @usage can be 'shellcheck'
linter = " " ,
-- @usage can be 'shfmt'
diagnostics = {
virtual_text = { spacing = 0 , prefix = " " } ,
signs = true ,
underline = true ,
2021-07-07 03:42:26 +02:00
} ,
2021-07-10 20:18:28 +02:00
formatter = {
exe = " shfmt " ,
args = { " -w " } ,
stdin = false ,
} ,
2021-07-08 18:58:22 +02:00
} ,
svelte = { } ,
tailwindcss = {
active = false ,
filetypes = {
" html " ,
" css " ,
" scss " ,
" javascript " ,
" javascriptreact " ,
" typescript " ,
" typescriptreact " ,
2021-07-05 03:14:01 +02:00
} ,
2021-07-10 20:18:28 +02:00
formatter = {
exe = " prettier " ,
args = { " --stdin-filepath " , vim.api . nvim_buf_get_name ( 0 ) , " --single-quote " } ,
} ,
2021-07-08 18:58:22 +02:00
} ,
terraform = { } ,
tsserver = {
-- @usage can be 'eslint'
linter = " " ,
2021-07-05 03:14:01 +02:00
diagnostics = {
virtual_text = { spacing = 0 , prefix = " " } ,
signs = true ,
underline = true ,
} ,
2021-07-10 20:18:28 +02:00
formatter = {
exe = " prettier " ,
args = { " --stdin-filepath " , vim.api . nvim_buf_get_name ( 0 ) , " --single-quote " } ,
} ,
2021-07-05 03:14:01 +02:00
} ,
2021-07-08 18:58:22 +02:00
vim = { } ,
2021-07-10 20:18:28 +02:00
yaml = {
formatter = {
exe = " prettier " ,
args = { " --stdin-filepath " , vim.api . nvim_buf_get_name ( 0 ) , " --single-quote " } ,
} ,
} ,
2021-07-05 03:14:01 +02:00
} ,
2021-07-06 04:57:00 +02:00
}
2021-07-09 23:03:22 +02:00
require " lv-zen.config "
2021-07-10 00:09:53 +02:00
require " lv-compe.config "
2021-07-10 03:01:23 +02:00
require " lv-dashboard.config "
require " lv-floatterm.config "
require " lv-galaxyline.config "
require " lv-gitsigns.config "
require " lv-telescope.config "
2021-07-10 19:27:20 +02:00
require " lv-floatterm.config "
2021-07-10 03:34:12 +02:00
require " lv-dap.config "
2021-07-10 03:57:55 +02:00
require " lv-which-key.config "
2021-07-10 16:51:47 +02:00
require " lv-treesitter.config "