summaryrefslogtreecommitdiff
path: root/lua/default-config.lua
diff options
context:
space:
mode:
authorChristian Chiarulli <[email protected]>2021-07-13 21:13:55 -0400
committerGitHub <[email protected]>2021-07-13 21:13:55 -0400
commita097fa4c04e6db34bb409e0dea302c20629da8ec (patch)
treefb1c5bdd14cac82a363ea6c25b03a475050305f2 /lua/default-config.lua
parent04f9f53914a7dd999117ed73c5fa0ab3b0dc95e4 (diff)
LunarVim 0.4.8 (#919)0.4.8
Diffstat (limited to 'lua/default-config.lua')
-rw-r--r--lua/default-config.lua262
1 files changed, 149 insertions, 113 deletions
diff --git a/lua/default-config.lua b/lua/default-config.lua
index 317886cc..b10c9590 100644
--- a/lua/default-config.lua
+++ b/lua/default-config.lua
@@ -5,97 +5,70 @@ TERMINAL = vim.fn.expand "$TERMINAL"
USER = vim.fn.expand "$USER"
O = {
- format_on_save = true,
- auto_close_tree = 0,
- auto_complete = true,
- colorcolumn = "99999", -- fixes indentline for now
+ leader_key = "space",
colorscheme = "spacegray",
- clipboard = "unnamedplus",
- hidden_files = true,
- wrap_lines = false,
- spell = false,
- spelllang = "en",
- number = true,
- relative_number = false,
- number_width = 4,
- shift_width = 2,
- tab_stop = 2,
- cmdheight = 2,
- cursorline = true,
- shell = "bash",
- scrolloff = 0,
- timeoutlen = 100,
- nvim_tree_disable_netrw = 0,
- ignore_case = true,
- smart_case = true,
- lushmode = false,
- hl_search = false,
- document_highlight = true,
+ line_wrap_cursor_movement = true,
transparent_window = false,
- leader_key = "space",
- vnsip_dir = vim.fn.stdpath "config" .. "/snippets",
+ format_on_save = true,
+ vsnip_dir = vim.fn.stdpath "config" .. "/snippets",
- -- @usage pass a table with your desired languages
- treesitter = {
- ensure_installed = "all",
- ignore_install = { "haskell" },
- highlight = { enabled = true },
- -- The below are for treesitter-textobjects plugin
- textobj_prefixes = {
- goto_next = "]", -- Go to next
- goto_previous = "[", -- Go to previous
- inner = "i", -- Select inside
- outer = "a", -- Selct around
- swap = "<leader>a", -- Swap with next
- },
- textobj_suffixes = {
- -- Start and End respectively for the goto keys
- -- for other keys it only uses the first
- ["function"] = { "f", "F" },
- ["class"] = { "m", "M" },
- ["parameter"] = { "a", "A" },
- ["block"] = { "k", "K" },
- ["conditional"] = { "i", "I" },
- ["call"] = { "c", "C" },
- ["loop"] = { "l", "L" },
- ["statement"] = { "s", "S" },
- ["comment"] = { "/", "?" },
- },
- -- The below is for treesitter hint textobjects plugin
- hint_labels = { "h", "j", "f", "d", "n", "v", "s", "l", "a" },
+ 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
},
+ plugin = {},
+
+ -- TODO: refactor for tree
+ auto_close_tree = 0,
+ nvim_tree_disable_netrw = 0,
+
lsp = {
+ document_highlight = true,
popup_border = "single",
},
- database = { save_location = "~/.config/nvcode_db", auto_execute = 1 },
-
- plugin = {
- -- Builtins
- dashboard = { active = false },
- colorizer = { active = false },
- -- zen = { active = false },
- ts_playground = { active = false },
- ts_context_commentstring = { active = false },
- ts_hintobjects = { active = false },
- ts_autotag = { active = false },
- ts_rainbow = { active = false },
- ts_textobjects = { active = false },
- ts_textsubjects = { active = false },
- telescope_fzy = { active = false },
- telescope_project = { active = false },
- indent_line = { active = false },
- symbol_outline = { active = false },
- debug = { active = false },
- dap_install = { active = false },
- lush = { active = false },
- diffview = { active = false },
- floatterm = { active = false },
- trouble = { active = false },
- sanegx = { active = false },
- },
+ database = { save_location = "~/.config/lunarvim_db", auto_execute = 1 },
+ -- TODO: just using mappings (leader mappings)
user_which_key = {},
user_plugins = {
@@ -106,8 +79,18 @@ O = {
{ "FileType", "qf", "set nobuflisted" },
},
+ formatters = {
+ filetype = {},
+ },
+
+ -- TODO move all of this into lang specific files, only require when using
lang = {
- cmake = {},
+ cmake = {
+ formatter = {
+ exe = "clang-format",
+ args = {},
+ },
+ },
clang = {
diagnostics = {
virtual_text = { spacing = 0, prefix = "" },
@@ -116,25 +99,43 @@ O = {
},
cross_file_rename = true,
header_insertion = "never",
+ filetypes = { "c", "cpp", "objc" },
+ formatter = {
+ exe = "clang-format",
+ args = {},
+ },
},
css = {
virtual_text = true,
},
dart = {
sdk_path = "/usr/lib/dart/bin/snapshots/analysis_server.dart.snapshot",
+ formatter = {
+ exe = "dart",
+ args = { "format" },
+ },
},
docker = {},
efm = {},
elm = {},
- emmet = { active = true },
+ emmet = { active = false },
elixir = {},
graphql = {},
- go = {},
+ go = {
+ formatter = {
+ exe = "gofmt",
+ args = {},
+ },
+ },
html = {},
java = {
java_tools = {
active = false,
},
+ formatter = {
+ exe = "prettier",
+ args = { "--stdin-filepath", vim.api.nvim_buf_get_name(0), "--single-quote" },
+ },
},
json = {
diagnostics = {
@@ -142,15 +143,27 @@ O = {
signs = true,
underline = true,
},
+ formatter = {
+ exe = "python",
+ args = { "-m", "json.tool" },
+ },
},
kotlin = {},
- latex = {},
+ latex = {
+ auto_save = false,
+ ignore_errors = {},
+ },
lua = {
diagnostics = {
virtual_text = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
+ formatter = {
+ exe = "stylua",
+ args = {},
+ stdin = false,
+ },
},
php = {
format = {
@@ -167,8 +180,14 @@ O = {
underline = true,
},
filetypes = { "php", "phtml" },
+ formatter = {
+ exe = "phpcbf",
+ args = { "--standard=PSR12", vim.api.nvim_buf_get_name(0) },
+ stdin = false,
+ },
},
python = {
+ -- @usage can be flake8 or yapf
linter = "",
isort = false,
diagnostics = {
@@ -181,6 +200,10 @@ O = {
auto_search_paths = true,
use_library_code_types = true,
},
+ formatter = {
+ exe = "yapf",
+ args = {},
+ },
},
ruby = {
diagnostics = {
@@ -189,6 +212,10 @@ O = {
underline = true,
},
filetypes = { "rb", "erb", "rakefile", "ruby" },
+ formatter = {
+ exe = "rufo",
+ args = { "-x" },
+ },
},
rust = {
rust_tools = {
@@ -196,6 +223,11 @@ O = {
parameter_hints_prefix = "<-",
other_hints_prefix = "=>", -- prefix for all the other hints (type, chaining)
},
+ -- @usage can be clippy
+ formatter = {
+ exe = "rustfmt",
+ args = { "--emit=stdout", "--edition=2018" },
+ },
linter = "",
diagnostics = {
virtual_text = { spacing = 0, prefix = "" },
@@ -212,6 +244,11 @@ O = {
signs = true,
underline = true,
},
+ formatter = {
+ exe = "shfmt",
+ args = { "-w" },
+ stdin = false,
+ },
},
svelte = {},
tailwindcss = {
@@ -226,44 +263,43 @@ O = {
"typescriptreact",
},
},
- terraform = {},
+ terraform = {
+ formatter = {
+ exe = "terraform",
+ args = { "fmt" },
+ stdin = false,
+ },
+ },
tsserver = {
- -- @usage can be 'eslint'
+ -- @usage can be 'eslint' or 'eslint_d'
linter = "",
diagnostics = {
virtual_text = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
+ formatter = {
+ exe = "prettier",
+ args = { "--stdin-filepath", vim.api.nvim_buf_get_name(0), "--single-quote" },
+ },
},
vim = {},
- yaml = {},
- },
-
- dashboard = {
-
- custom_header = {
- "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣤⣶⣾⠿⠿⠟⠛⠛⠛⠛⠿⠿⣿⣷⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- " ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⡿⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠿⣷⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⡿⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⢿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- "⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠒⠂⠉⠉⠉⠉⢩⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- "⠀⠀⠀⠀⠀⠀⠀⠀⠸⡀⠀⠀⠀⠀⠀⢰⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠠⡀⠀⠀⢀⣾⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠢⢀⣸⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡧⢄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⠀⠈⠁⠒⠤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣇⠀⠀⠀⠀⠀⠀⠉⠢⠤⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡟⠈⠑⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠑⠒⠤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⡇⠀⠀⢀⣣⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- "⠀⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠀⠀⠒⠢⠤⠄⣀⣀⠀⠀⠀⢠⣿⡟⠀⠀⠀⣺⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- "⠀⣿⠇⠀⠀⠀⠀⠀⣤⡄⠀⠀⢠⣤⡄⠀⢨⣭⣠⣤⣤⣤⡀⠀⠀⢀⣤⣤⣤⣤⡄⠀⠀⠀⣤⣄⣤⣤⣤⠀⠀⣿⣯⠉⠉⣿⡟⠀⠈⢩⣭⣤⣤⠀⠀⠀⠀⣠⣤⣤⣤⣄⣤⣤",
- "⢠⣿⠀⠀⠀⠀⠀⠀⣿⠃⠀⠀⣸⣿⠁⠀⣿⣿⠉⠀⠈⣿⡇⠀⠀⠛⠋⠀⠀⢹⣿⠀⠀⠀⣿⠏⠀⠸⠿⠃⠀⣿⣿⠀⣰⡟⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⡟⢸⣿⡇⢀⣿",
- "⣸⡇⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⣿⡟⠀⢠⣿⡇⠀⠀⢰⣿⡇⠀⣰⣾⠟⠛⠛⣻⡇⠀⠀⢸⡿⠀⠀⠀⠀⠀⠀⢻⣿⢰⣿⠀⠀⠀⠀⠀⠀⣾⡇⠀⠀⠀⢸⣿⠇⢸⣿⠀⢸⡏",
- "⣿⣧⣤⣤⣤⡄⠀⠘⣿⣤⣤⡤⣿⠇⠀⢸⣿⠁⠀⠀⣼⣿⠀⠀⢿⣿⣤⣤⠔⣿⠃⠀⠀⣾⡇⠀⠀⠀⠀⠀⠀⢸⣿⣿⠋⠀⠀⠀⢠⣤⣤⣿⣥⣤⡄⠀⣼⣿⠀⣸⡏⠀⣿⠃",
- "⠉⠉⠉⠉⠉⠁⠀⠀⠈⠉⠉⠀⠉⠀⠀⠈⠉⠀⠀⠀⠉⠉⠀⠀⠀⠉⠉⠁⠈⠉⠀⠀⠀⠉⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠀⠀⠀⠀⠈⠉⠉⠉⠉⠉⠁⠀⠉⠁⠀⠉⠁⠀⠉⠀",
+ yaml = {
+ formatter = {
+ exe = "prettier",
+ args = { "--stdin-filepath", vim.api.nvim_buf_get_name(0), "--single-quote" },
+ },
},
- footer = { "chrisatmachine.com" },
},
}
-require "lv-zen.config"
+require "core.status_colors"
+require("core.gitsigns").config()
+require("core.compe").config()
+require("core.dashboard").config()
+require("core.dap").config()
+require("core.floatterm").config()
+require("core.zen").config()
+require("core.telescope").config()
+require("core.treesitter").config()
+require("core.which-key").config()