forked from doom-neovim/doom-nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoom_config.lua
480 lines (410 loc) · 13.3 KB
/
doom_config.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
-- doom_config - Doom Nvim user configurations file
--
-- This file contains the user-defined configurations for Doom nvim and consists
-- in two Lua tables:
-- 1. Doom, this one defines all the Doom nvim configurations that you can
-- tweak to fit your needs or tastes.
--
-- 2. Nvim, this one defines all the custom configurations that you want to
-- use in Neovim, e.g. a colorscheme italic_comments global variable
local M = {}
M.source = debug.getinfo(1, "S").source:sub(2)
M.config = {
doom = {
-- Pins plugins to a commit sha to prevent breaking changes
-- @default = true
freeze_dependencies = true,
-- Autosave
-- false : Disable autosave
-- true : Enable autosave
-- @default = false
autosave = false,
-- Format on save
-- false : Disable format on save
-- true : Enable format on save
-- @default = false
fmt_on_save = false,
-- Disable Vim macros
-- false : Enable Vim macros
-- true : Disable Vim macros
-- @default = false
disable_macros = false,
-- Use netrw as files explorer
-- false : Use nvim-tree.lua
-- true : Use netrw
-- @default = false
use_netrw = false,
-- Enable folding
-- true : fold is enabled
-- false : fold is disabled
-- @default = true
foldenable = true,
-- Autosave sessions
-- false : Disable session autosave
-- true : Enable session autosave
-- @default = false
autosave_sessions = false,
-- Autoload sessions
-- false : Disable session autoload
-- true : Enable session autoload
-- @default = false
autoload_last_session = false,
-- Enable Swap files
-- false : no swap files
-- true : enables swap files
-- @default = false
swap_files = false,
-- Undo Directories
-- the backup variable enables backup related settings (undofile, undodir)
-- false : ignores undo Directories (this code block will be ignored)
-- true : enable undo files/undo dirs.
-- @default = false
-- WARNING: if you change this to false and you have an undo dir already,
-- it will REMOVE the undodir (loss of data might take place)
backup = false,
-- Enable Line wrapping
-- false : disables line wrapping
-- true : enables line wrapping
-- @default = false
line_wrap = false,
-- Enable Show mode ( -- INSERT --, -- NORMAL --, -- VISUAL -- )
-- false : disables show mode
-- true : enables show mode
-- @default = false
show_mode = false,
-- Enable scroll off
-- false : disables scroll off
-- true : enables scroll off
-- @default = true, @default scrolloff_amount = 4,
scrolloff = true,
scrolloff_amount = 4,
-- Enable mouse
-- false : disables mouse
-- true : enables mouse
-- @default = true
mouse = true,
-- Preserve last editing position
-- false : Disable preservation of last editing position
-- true : Enable preservation of last editing position
-- @default = false
preserve_edit_pos = false,
-- Allow overriding the default Doom Nvim keybinds
-- false : Default keybinds cannot be overwritten
-- true : Default keybinds can be overwritten
-- @default = true
allow_default_keymaps_overriding = true,
-- horizontal split on creating a new file (<Leader>fn)
-- false : doesn't split the window when creating a new file
-- true : horizontal split on creating a new file
-- @default = true
new_file_split = true,
-- enable current line highlight
-- false : disables current line highlight
-- true : enables current line highlight
-- @default = true
line_highlight = true,
-- Automatically split right
-- false : splits left (vertically)
-- true : splits right (vertically)
-- @default = true
split_right = true,
-- Automatically split above
-- false : splits above (horizontally)
-- true : splits below (horizontally)
-- @default = true
split_below = true,
-- Use clipboard outside of vim
-- false : won't use third party clipboard
-- true : enables third part clipboard
-- @default = true
clipboard = true,
-- Enable auto comment (current line must be commented)
-- false : disables auto comment
-- true : enables auto comment
-- @default = false
auto_comment = false,
-- Show indent lines
-- @default = true
show_indent = true,
-- Expand tabs
-- Specifies if spaces or tabs must be used
-- false : spaces
-- true : tabs
-- @default = true
expand_tabs = true,
-- Set numbering
-- false : Enable number lines
-- true : Disable number lines
-- @default = false
disable_numbering = false,
-- Set numbering style
-- false : Shows absolute number lines
-- true : Shows relative number lines
-- @default = true
relative_num = true,
-- Enable winwidth
-- false : Manually set win width
-- true : Active window auto sets width
-- @default = false, @default win_width_nr = 85
win_width = false,
win_width_nr = 85,
-- Enable Highlight on yank
-- false : disables highligh on yank
-- true : enables highlight on yank
-- @default = true
highlight_yank = true,
-- Enable guicolors
-- Enables gui colors on GUI versions of Neovim
-- @default = true
enable_guicolors = true,
-- Tree explorer on the right
-- Places the Tree explorer buffer to the right when enabled
-- @default = false
explorer_right = false,
-- Show hidden files
-- @default = true
show_hidden = true,
-- Checkupdates on start
-- @default = false
check_updates = false,
-- Auto install plugins on launch, useful if you don't want to run
-- PackerInstall every time you add a new plugin
-- @default = true
auto_install_plugins = true,
-- Disable dashboard status line (does not work perfectly)
-- false : disables dashboard status line
-- true : enables dashboard status line
-- @default = true
dashboard_statline = true,
-- Show the editing file path in your status line
-- false : show only file name on status line
-- true : show file name and the updir in status line
statusline_show_file_path = true,
-- Set the keybindings modules that you want to use
-- false : disables keybindings module
-- true : enables keybindings module
keybinds_modules = {
-- Core doom keybindings
core = true,
-- Movement keybindings, jump between your windows, buffers and code
movement = true,
-- Leader keybindings, a bunch of useful keybindings managed by space key
-- WARNING: disabling this will break which-key plugin if the plugin is enabled
leader = true,
-- Completion and snippets keybindings
completion = true,
},
-- sequences used for escaping insert mode
-- @default = { 'jk', 'kj' }
escape_sequences = { "jk", "kj" },
-- Disable or enable Doom autocommands, this can break some configuration options (they will stop working)
-- e.g. preserve_edit_pos or autosave
--
-- false : enable autocommands module
-- true : disable autocommands module
-- @default = false
disable_autocommands = false,
-- Enable LSP diagnostics virtual text
-- @default = false
enable_lsp_virtual_text = false,
-- Use floating windows for plugins manager (packer) operations
-- @default = false
use_floating_win_packer = false,
-- Default indent size
-- @default = 4
indent = 4,
-- Set max cols
-- Defines the column to show a vertical marker
-- @default = 80
max_columns = 80,
-- Completion box height
-- @default = 10
complete_size = 10,
-- Completion box transparency
-- 0 = no transparency
-- 100 = fully transparent
-- @default = 25
complete_transparency = 25,
-- Sidebar sizing
-- Specifies the default width of Tree Explorer and Tagbar
-- @default = 25
sidebar_width = 25,
-- Set the Terminal width
-- Applies only to float direction
-- @default = 70
terminal_width = 70,
-- Set the Terminal height
-- Applies to all directions except window
-- @default = 20
terminal_height = 20,
-- Conceal level
-- Set Neovim conceal level
-- 0 : Disable indentline and show all
-- 1 : Conceal some functions and show indentlines
-- 2 : Concealed text is completely hidden unless it has a custom replacement
-- character defined
-- 3 : Concealed text is completely hidden
conceallevel = 0,
-- Logging level
-- Set Doom logging level
-- Available levels:
-- · trace
-- · debug
-- · info
-- · warn
-- · error
-- · fatal
-- @default = 'info'
logging = "info",
-- Set the Terminal direction
-- Available directions:
-- - vertical
-- - horizontal
-- - window
-- - float
-- @default = 'horizontal'
terminal_direction = "horizontal",
-- NOTE: This will only be activated if 'backup' is true.
-- We don'recommend you put this outside of neovim so we've restricted to the path: ~/.config/nvim
-- WARNING: only put the folder name that you want. (eg: undo_dir = '/undodir')
-- @default_directory = '~/.config/nvim/undodir'
undo_dir = "/undodir",
-- Default colorscheme
-- @default = doom-one
colorscheme = "doom-one",
-- Background color
-- @default = dark
colorscheme_bg = "dark",
-- Doom One colorscheme settings
doom_one = {
-- If the cursor color should be blue
-- @default = false
cursor_coloring = false,
-- If TreeSitter highlighting should be enabled
-- @default = true
enable_treesitter = true,
-- If the comments should be italic
-- @default = false
italic_comments = false,
-- If the telescope plugin window should be colored
-- @default = true
telescope_highlights = true,
-- If the built-in Neovim terminal should use the doom-one
-- colorscheme palette
-- @default = false
terminal_colors = true,
-- If the Neovim instance should be transparent
-- @default = false
transparent_background = false,
},
-- Set gui fonts here
-- @default = "FiraCode Nerd Font", @default font size = 15,
-- WARNING: Font sizes must be in string format!
guifont = "FiraCode Nerd Font",
guifont_size = "15",
-- Change Which Key background color
-- can use hex, or normal color names (eg: Red, Gree, Blue)
-- @default = #202328
whichkey_bg = "#202328",
-- Set your custom lsp diagnostic symbols below
lsp_error = "",
lsp_warn = "",
lsp_hint = "",
lsp_info = "",
lsp_virtual_text = " ",
-- Set your linters for the programming languages that you use,
-- see https://github.com/mfussenegger/nvim-lint#available-linters
linters = {
c = {},
cpp = {},
css = {},
html = {},
javascript = {},
lua = {},
markdown = {},
nix = {},
python = {},
ruby = {},
sh = {},
typescript = {},
},
-- Set your dashboard custom colors below
-- @default = doom emacs' default dashboard colors
dashboard_custom_colors = {
header_color = "#586268",
center_color = "#51afef",
shortcut_color = "#a9a1e1",
footer_color = "#586268",
},
-- Set your custom dashboard header below
-- @default = doom emacs' default dashboard header
dashboard_custom_header = {},
},
nvim = {
-- Set custom Neovim global variables
-- @default = {}
-- example:
-- {
-- ['sonokai_style'] = 'andromeda',
-- ['modelineexpr'] = true,
-- }
--
-- modeline feature was turned off to reduce security exploit surfaces.
-- Since modeline now uses whitelist approach since nvim 0.4 /vim 8.1,
-- enabling this is as safe as external packages such as securemodelines.
-- See https://github.com/neovim/neovim/issues/2865
--
global_variables = {},
-- Set custom autocommands
-- @default = {}
-- example:
-- augroup_name = {
-- { 'BufNewFile,BufRead', 'doom_modules.lua', 'set ft=lua'}
-- }
autocmds = {},
-- Set custom key bindings
-- @default = {}
-- example:
-- {
-- {'n', 'ca', ':Lspsaga code_action<CR>', options}
-- }
--
-- where
-- 'n' is the map scope
-- 'ca' is the map activator
-- ':Lspsaga ...' is the command to be executed
-- options is a Lua table containing the mapping options, e.g.
-- { silent = true }, see ':h map-arguments'.
mappings = {},
-- Set custom commands
-- @default = {}
-- example:
-- {
-- 'echo "Hello, custom commands!"'
-- }
commands = {},
-- Set custom functions
-- @default = {}
-- example:
-- {
-- {
-- hello_custom_func = function()
-- print("Hello, custom functions!")
-- end,
-- -- If the function should be ran on neovim launch or if it should
-- -- be a global function accesible from anywhere
-- run_on_start = false,
-- },
-- }
functions = {},
-- Set custom options
-- @default = {}
-- example:
-- {
-- ['shiftwidth'] = 4
-- }
options = {},
},
}
return M
-- vim: sw=2 sts=2 ts=2 fdm=indent noexpandtab