-
Notifications
You must be signed in to change notification settings - Fork 68
/
config.lua
135 lines (126 loc) 路 3.99 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
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
-- Override Cosmic configuration options
-- You can require null-ls if needed
-- local null_ls = require('null-ls')
local config = {
-- See :h nvim_open_win for possible border options
border = 'rounded',
-- LSP settings
lsp = {
-- Enable/disable inlay hints
inlay_hint = false,
-- True/false or table of filetypes {'.ts', '.js',}
format_on_save = true,
-- Time in MS before format timeout
format_timeout = 3000,
-- Set to false to disable rename notification
rename_notification = true,
-- Enable non-default servers, use default lsp config
-- Check here for configs that will be used by default: https://github.com/williamboman/nvim-lsp-installer/tree/main/lua/nvim-lsp-installer/servers
-- lsp servers that should be installed
ensure_installed = {
'rust_analyzer',
},
-- lsp servers that should be enabled
servers = {
-- Enable rust_analyzer
rust_analyzer = true,
-- Enable tsserver w/custom settings
tsserver = {
-- Disable formatting (defaults to true)
format = false,
-- OR add/override server options
opts = {
on_attach = function(client, bufnr) end,
flags = {
debounce_text_changes = 150,
},
},
},
-- See Cosmic defaults lsp/providers/null_ls.lua and https://github.com/jose-elias-alvarez/null-ls.nvim/
-- If adding additional sources, be sure to also copy the defaults that you would like to preserve from lsp/providers/null_ls.lua
null_ls = {
-- Disable default list of sources provided by CosmicNvim
default_cosmic_sources = false,
--disable formatting
format = false,
-- Add additional sources here
get_sources = function()
local null_ls = require('null-ls')
return {
null_ls.builtins.diagnostics.shellcheck,
null_ls.builtins.diagnostics.actionlint.with({
condition = function()
local cwd = vim.fn.expand('%:p:.')
return cwd:find('.github/workflows')
end,
}),
}
end,
},
},
},
-- adjust default plugin settings
plugins = {
-- See https://github.com/rmagatti/auto-session#%EF%B8%8F-configuration
auto_session = {},
-- https://github.com/numToStr/Comment.nvim#configuration-optional
comment_nvim = {},
-- See https://github.com/CosmicNvim/cosmic-ui#%EF%B8%8F-configuration
cosmic_ui = {},
-- See :h vim.diagnostic.config for all diagnostic configuration options
diagnostic = {},
-- See :h gitsigns-usage
gitsigns = {},
-- See https://git.sr.ht/~whynothugo/lsp_lines.nvim
lsp_lines = {
-- additional flag only for CosmicNvim
-- true - loads plugin and is enabled at start
-- false - loads plugin but is not enabled at start
-- you may use <leader>ld to toggle
enable_on_start = true,
},
-- See https://github.com/nvim-lualine/lualine.nvim#default-configuration
lualine = {},
-- See https://github.com/L3MON4D3/LuaSnip/blob/577045e9adf325e58f690f4d4b4a293f3dcec1b3/README.md#config
luasnip = {},
-- See :h telescope.setup
telescope = {},
-- See https://github.com/folke/todo-comments.nvim#%EF%B8%8F-configuration
todo_comments = {},
-- See :h nvim-treesitter-quickstart
treesitter = {},
-- See :h cmp-usage
nvim_cmp = {},
-- See :h nvim-tree.setup
nvim_tree = {},
},
-- Disable plugins default enabled by CosmicNvim
disable_builtin_plugins = {
--[[
'auto-session',
'colorizer',
'comment-nvim',
'dashboard',
'fugitive',
'gitsigns',
'lualine',
'noice',
'nvim-cmp',
'nvim-tree',
'telescope',
'terminal',
'theme',
'todo-comments',
'treesitter',
]]
},
-- Add additional plugins (lazy.nvim)
add_plugins = {
'ggandor/lightspeed.nvim',
{
'romgrk/barbar.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
},
},
}
return config