-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua
112 lines (88 loc) · 2.41 KB
/
init.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
require("VimSettings")
require("PackerConf")
require("NvimCmp")
local settings = require("Settings")
function needs_packer()
require('lualine').setup {
options = {
theme = 'catppuccin'
}
}
require('todo-comments').setup()
require('trouble').setup()
require("mason").setup()
require("mason-lspconfig").setup()
-- NOTE: https://github.com/williamboman/mason-lspconfig.nvim/blob/main/doc/server-mapping.md
require("mason-lspconfig").setup_handlers {
-- The first entry (without a key) will be the default handler
-- and will be called for each installed server that doesn't have
-- a dedicated handler.
function (server_name) -- default handler (optional)
require("lspconfig")[server_name].setup {}
end,
-- Next, you can provide a dedicated handler for specific servers.
-- For example, a handler override for the `rust_analyzer`:
["sumneko_lua"] = function ()
require("lspconfig").sumneko_lua.setup {
settings = {
Lua = {
diagnostics = {
globals = {
'vim',
'love',
'awesome',
'client',
'screen',
'root',
},
disable = {'lowercase-global'},
},
telemetry = {
enable = false,
},
},
},
filetypes = {
'lua',
},
}
end
}
-- mason can't do this one
require'lspconfig'.gdscript.setup{}
if settings.auto_open_sidebar then
vim.api.nvim_create_autocmd({"VimEnter"}, {command = "CHADopen --nofocus"})
end
require("luasnip.loaders.from_vscode").lazy_load()
vim.cmd 'autocmd BufEnter * if (winnr("$") == 1 && &filetype == "CHADTree") | q | endif'
vim.cmd 'colorscheme catppuccin'
end
if not pcall(needs_packer) then
print"you need to type :PackerInstall first"
end
local chadtree_settings = {
theme = {
text_colour_set = "nerdtree_syntax_dark",
}
}
vim.api.nvim_set_var("chadtree_settings", chadtree_settings)
vim.keymap.set('n', '<A-f>', ':CHADopen<CR>')
vim.keymap.set('n', '<A-t>', ':TroubleToggle<CR>')
vim.cmd [[
:tnoremap <A-h> <C-\><C-N><C-w>h
:tnoremap <A-j> <C-\><C-N><C-w>j
:tnoremap <A-k> <C-\><C-N><C-w>k
:tnoremap <A-l> <C-\><C-N><C-w>l
:inoremap <A-h> <C-\><C-N><C-w>h
:inoremap <A-j> <C-\><C-N><C-w>j
:inoremap <A-k> <C-\><C-N><C-w>k
:inoremap <A-l> <C-\><C-N><C-w>l
:nnoremap <A-h> <C-w>h
:nnoremap <A-j> <C-w>j
:nnoremap <A-k> <C-w>k
:nnoremap <A-l> <C-w>l
]]
--vim.g.coq_settings = {
-- auto_start = 'shut-up'
--}
vim.cmd 'hi Normal guibg=NONE ctermbg=NONE'