-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lv-config.lua
145 lines (118 loc) · 4.27 KB
/
lv-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
--[[
O is the global options object
Formatters and linters should be
filled in as strings with either
a global executable or a path to
an executable
]] -- THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT
-- general
O.auto_complete = true
O.colorscheme = 'lunar'
O.auto_close_tree = 0
O.wrap_lines = false
O.timeoutlen = 100
O.document_highlight = true
O.extras = false
O.leader_key = ' '
O.ignore_case = true
O.smart_case = true
-- After changing plugin config it is recommended to run :PackerCompile
O.plugin.hop.active = true
O.plugin.dial.active = false
O.plugin.dashboard.active = true
O.plugin.matchup.active = true
O.plugin.colorizer.active = true
O.plugin.numb.active = false
O.plugin.ts_playground.active = false
O.plugin.indent_line.active = false
O.plugin.gitlinker.active = true
O.plugin.zen.active = true
-- dashboard
-- O.dashboard.custom_header = {""}
-- O.dashboard.footer = {""}
-- 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.ignore_install = {"haskell"}
O.treesitter.highlight.enabled = true
O.lang.clang.diagnostics.virtual_text = false
O.lang.clang.diagnostics.signs = false
O.lang.clang.diagnostics.underline = false
-- python
-- add things like O.python.formatter.yapf.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.lang.python.active = true
O.lang.python.isort = true
O.lang.python.autoformat = true
O.lang.python.diagnostics.virtual_text = true
O.lang.python.diagnostics.signs = true
O.lang.python.diagnostics.underline = true
O.lang.python.analysis.type_checking = "off"
O.lang.python.analysis.auto_search_paths = true
O.lang.python.analysis.use_library_code_types = true
-- lua
-- TODO look into stylua
O.lang.lua.active = true
O.lang.lua.formatter = 'lua-format'
-- O.lua.formatter = 'lua-format'
O.lang.lua.autoformat = false
-- javascript
O.lang.tsserver.formatter = 'prettier'
O.lang.tsserver.linter = nil
O.lang.tsserver.autoformat = true
-- php
O.lang.php.active = true
O.lang.php.autoformat = true
-- tailwind
O.lang.tailwindcss.active = true
O.lang.tailwindcss.autoformat = true
-- json
O.lang.json.active = false
O.lang.json.autoformat = true
-- ruby
O.lang.ruby.autoformat = true
-- go
O.lang.go.autoformat = true
-- rust
O.lang.rust.autoformat = true
-- create custom autocommand field (This would be easy with lua)
-- Turn off relative_numbers
-- O.relative_number = false
-- Turn off cursorline
-- O.cursorline = false
-- Neovim turns the default cursor to 'Block'
-- when switched back into terminal.
-- This below line fixes that. Uncomment if needed.
-- vim.cmd('autocmd VimLeave,VimSuspend * set guicursor=a:ver90') -- Beam
-- vim.cmd('autocmd VimLeave,VimSuspend * set guicursor=a:hor20') -- Underline
-- NOTE: Above code doesn't take a value from the terminal's cursor and
-- replace it. It hardcodes the cursor shape.
-- And I think `ver` means vertical and `hor` means horizontal.
-- The numbers didn't make a difference in alacritty. Please change
-- the number to something that suits your needs if it looks weird.
-- TODO
-- custom autocommands
-- user defined plugin config
-- custom settings
-- Custom Keymappings
-- Put search results in the middle of the screen vim.api.nvim_set_keymap('n', 'n', 'nzz', {noremap = true, silent = true})
vim.api.nvim_set_keymap('n', 'N', 'Nzz', {noremap = true, silent = true})
vim.api.nvim_set_keymap('n', 'n', 'nzz', {noremap = true, silent = true})
-- System Clipboard Mappings
-- vim.api.nvim_set_keymap('v', 'y', '"*y', {noremap = true, silent = true})
-- vim.api.nvim_set_keymap('v', 'p', '"*p', {noremap = true, silent = true})
vim.api.nvim_set_keymap('v', 'Y', '"+y', {noremap = true, silent = true})
vim.api.nvim_set_keymap('v', "<leader>v", '"+p', {noremap = true, silent = true})
-- Enter key in normal mode save
vim.api.nvim_set_keymap('n', '<CR>', ':w<CR>', {silent = true})
-- Hop
vim.api.nvim_set_keymap('n', 's', "<cmd>lua require'hop'.hint_char1()<cr>", {noremap = true, silent = true})
-- Easymotion
-- vim.cmd([[
-- nmap s <Plug>(easymotion-overwin-f)
-- map <C-j> <Plug>(easymotion-j)
-- map <C-k> <Plug>(easymotion-k)
-- ]])
vim.cmd('hi Normal guibg=NONE ctermbg=NONE')