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
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("sixfourtwelve")
local formatter_ocamlformat = {
function()
return {
exe = "ocamlformat",
args = { vim.api.nvim_buf_get_name(0) },
stdin = true
}
end
}
require('formatter').setup({
logging = true,
filetype = {
ocamlformat = formatter_ocamlformat,
}
})
vim.api.nvim_exec([[
let g:go_fmt_autosave = 1
let g:go_fmt_command = "goimports"
let g:go_highlight_fields = 1
let g:go_highlight_functions = 1
let g:go_highlight_function_calls = 1
let g:go_highlight_extra_types = 1
let g:go_highlight_operators = 1
]], true)
vim.cmd([[
augroup CppModulesHighlight
autocmd!
autocmd FileType cpp syntax keyword cppModulesKeyword module import export
autocmd FileType cpp highlight def link cppModulesKeyword Statement
augroup END
]])
vim.api.nvim_exec([[
autocmd BufNewFile,BufRead *.m set filetype=objc
]], true)
vim.o.background = "dark"
require("tokyonight").setup({
style = "moon",
transparent = true,
})
-- vim.cmd("colorscheme bore")
vim.api.nvim_command(
"autocmd BufWritePre *.json,*.ex,*.go,*.lua,*.rb,*.hs,*.py,*.ml,*.mli,*.c,*.h,*.cc,*.hh,*.cpp,*.hpp,*.m,*.mm,*.php,*.odin,*.rs,*.cs,*.java,*.re,*.rei,*.res,*.resi,*.scala,*.sbt,*.gleam,*.ts,*.tsx,*.test.ts,*.test.tsx,*.js,*.jsx,*.test.js,*.test.jsx,*.cr,*.odin,*.astro,*.zig,*.clj,*.cljc,*.cljs lua vim.lsp.buf.format()")
vim.api.nvim_set_option("clipboard", "unnamed")
require("ts-error-translator").setup()
require('illuminate').configure({
providers = {
'lsp',
'treesitter',
'regex',
},
})
-- require('.lua.sixfourtwelve.knixstatusline').setup()
require("lualine").setup({
options = {
theme = "kanso",
icons_enabled = true,
globalstatus = true,
component_separators = { left = " ", right = " " },
section_separators = { left = "█", right = "█" },
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff', 'diagnostics'},
lualine_c = {'filename', 'branch', 'diff', 'diagnostics'},
lualine_x = {'encoding', 'fileformat', 'filetype'},
lualine_y = {'progress'},
lualine_z = {'location'}
},
},
})
|