-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.lua
103 lines (93 loc) · 2.62 KB
/
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
reload("user.config")
vim.g.neotree_auto_cd = 0
-- put this somewhere in init.lua
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.g.loaded_netrwSettings = 1
vim.g.loaded_netrwFileHandlers = 1
lvim.builtin.nvimtree.active = false -- NOTE: using neo-tree
-- -- Colorscheme
lvim.colorscheme = "nord"
-- lvim.colorscheme = "rose-pine"
-- require("rose-pine").setup({
-- variant = "moon",
-- })
local formatters = require("lvim.lsp.null-ls.formatters")
formatters.setup({
{ name = "black" },
{ name = "stylua" },
{
name = "clang_format",
args = { "--style=chromium" },
},
{
name = "prettier",
---@usage arguments to pass to the formatter
-- these cannot contain whitespace
-- options such as `--line-width 80` become either `{"--line-width", "80"}` or `{"--line-width=80"}`
args = { "--print-width", "100" },
---@usage only start in these filetypes, by default it will attach to all filetypes it supports
filetypes = { "typescript", "typescriptreact", "javascript" },
},
})
local linters = require("lvim.lsp.null-ls.linters")
linters.setup({
{ name = "flake8", filetypes = { "python" } },
{ name = "hadolint", filetypes = { "dockerfile" } },
{
name = "shellcheck",
args = { "--severity", "warning" },
},
{ name = "cpplint", filetypes = { "cpp" } },
})
local clangd_flags = {
"--all-scopes-completion",
"--suggest-missing-includes",
"--background-index",
"--pch-storage=disk",
"--cross-file-rename",
"--log=info",
"--completion-style=detailed",
"--enable-config", -- clangd 11+ supports reading from .clangd configuration file
"--clang-tidy",
"--offset-encoding=utf-16", --temporary fix for null-ls
"--clang-tidy-checks=-*,llvm-*,clang-analyzer-*,modernize-*,-modernize-use-trailing-return-type",
"--fallback-style=Google",
"--header-insertion=never",
"--query-driver=<list-of-white-listed-complers>",
}
local clangd_bin = "clangd"
local opts = {
cmd = { clangd_bin, unpack(clangd_flags) },
}
require("lvim.lsp.manager").setup("clangd", opts)
-- Additional plugins
lvim.plugins = {
{ "folke/trouble.nvim" },
{ "theprimeagen/harpoon" },
{ "CRAG666/code_runner.nvim" },
{ "mg979/vim-visual-multi", branch = "master" },
{ "mfussenegger/nvim-dap" },
{ "mfussenegger/nvim-dap-python" },
{ "AckslD/swenv.nvim" },
{ "stevearc/dressing.nvim" },
{ "rose-pine/neovim" },
{ "nordtheme/vim" },
{ "folke/todo-comments.nvim" },
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v2.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
},
},
{
"s1n7ax/nvim-window-picker",
version = "v1.*",
config = function()
require("window-picker").setup()
end,
},
}