-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.lua
160 lines (143 loc) · 4.89 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
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
require("config.lazy")
require("config.options")
require("config.autocmd")
require("config.mappings")
-- FIXME: Require setups should be replaced by using the opts field when possible
-- Furthermore, even if not possible they should not appear in the init.lua
require("mason").setup()
require("nvim-web-devicons").setup();
local capabilities = require('cmp_nvim_lsp').default_capabilities()
require("mason-lspconfig").setup()
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 {
capabilities = capabilities
}
end,
-- Next, you can provide a dedicated handler for specific servers.
-- For example, a handler override for the `rust_analyzer`:
-- ["rust_analyzer"] = function ()
-- require("rust-tools").setup {}
-- end
}
vim.opt.termguicolors = true
require("bufferline").setup{}
require("noice").setup({
lsp = {
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
},
},
cmdline = {
view = "cmdline",
},
-- you can enable a preset for easier configuration
presets = {
bottom_search = true, -- use a classic bottom cmdline for search
command_palette = false, -- position the cmdline and popupmenu together
long_message_to_split = true, -- long messages will be sent to a split
inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = true, -- add a border to hover docs and signature help
},
routes = {
{
filter = {
event = "msg_show",
kind = "",
find = "written",
},
opts = { skip = true },
},
},
})
require('guess-indent').setup{
auto_cmd = true,
on_tab_options = {
["expandtab"] = false,
},
on_space_options = {
["expandtab"] = true,
["tabstop"] = 8,
["softtabstop"] = "detected",
["shiftwidth"] = "detected",
},
buftype_exclude = {
"help",
"nofile",
"terminal",
"prompt",
},
}
require('lualine').setup {
options = {
icons_enabled = true,
theme = 'auto',
component_separators = { left = '', right = ''},
section_separators = { left = '', right = ''},
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
globalstatus = false,
refresh = {
statusline = 1000,
tabline = 1000,
winbar = 1000,
}
},
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff', 'diagnostics'},
lualine_c = {'filename'},
lualine_x = {'encoding', 'fileformat', 'filetype'},
lualine_y = {'progress'},
lualine_z = {'location'}
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {'filename'},
lualine_x = {'location'},
lualine_y = {},
lualine_z = {}
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {}
}
require("astrotheme").setup({
palette = "astrodark", -- String of the default palette to use when calling `:colorscheme astrotheme`
background = { -- :h background, palettes to use when using the core vim background colors
light = "astrolight",
dark = "astrodark",
},
style = {
transparent = false, -- Bool value, toggles transparency.
inactive = true, -- Bool value, toggles inactive window color.
float = true, -- Bool value, toggles floating windows background colors.
neotree = true, -- Bool value, toggles neo-trees background color.
border = true, -- Bool value, toggles borders.
title_invert = true, -- Bool value, swaps text and background colors.
italic_comments = true, -- Bool value, toggles italic comments.
simple_syntax_colors = false, -- Bool value, simplifies the amounts of colors used for syntax highlighting.
},
termguicolors = true, -- Bool value, toggles if termguicolors are set by AstroTheme.
terminal_color = true, -- Bool value, toggles if terminal_colors are set by AstroTheme.
plugin_default = "auto", -- Sets how all plugins will be loaded
-- "auto": Uses lazy / packer enabled plugins to load highlights.
-- true: Enables all plugins highlights.
-- false: Disables all plugins.
plugins = { -- Allows for individual plugin overrides using plugin name and value from above.
["bufferline.nvim"] = true,
},
})
vim.cmd.colorscheme("astrodark")