1
1
-- Override Cosmic configuration options
2
+ -- local cmp = require('cmp')
2
3
3
4
-- You can require null-ls if needed
4
5
-- local null_ls = require('null-ls')
5
6
6
7
local config = {
7
- -- See :h nvim_open_win for possible border options
8
- border = " rounded" ,
9
- -- LSP settings
10
- lsp = {
11
- -- True/false or table of filetypes {'.ts', '.js',}
12
- format_on_save = true ,
13
- -- Time in MS before format timeout
14
- format_timeout = 3000 ,
15
- -- Set to false to disable rename notification
16
- rename_notification = true ,
17
- -- Enable non-default servers, use default lsp config
18
- -- Check here for configs that will be used by default: https://github.com/williamboman/nvim-lsp-installer/tree/main/lua/nvim-lsp-installer/servers
8
+ -- See :h nvim_open_win for possible border options
9
+ border = ' rounded' ,
10
+ -- LSP settings
11
+ lsp = {
12
+ -- True/false or table of filetypes {'.ts', '.js',}
13
+ format_on_save = true ,
14
+ -- Time in MS before format timeout
15
+ format_timeout = 3000 ,
16
+ -- Set to false to disable rename notification
17
+ rename_notification = true ,
18
+ -- Enable non-default servers, use default lsp config
19
+ -- Check here for configs that will be used by default: https://github.com/williamboman/nvim-lsp-installer/tree/main/lua/nvim-lsp-installer/servers
19
20
20
- -- lsp servers that should be installed
21
- ensure_installed = {
22
- " rust_analyzer" ,
23
- },
21
+ -- lsp servers that should be installed
22
+ ensure_installed = {
23
+ ' rust_analyzer' ,
24
+ },
24
25
25
- -- lsp servers that should be enabled
26
- servers = {
27
- -- no this poop
28
- tailwindcss = false ,
29
- -- Enable rust_analyzer
30
- rust_analyzer = true ,
26
+ -- lsp servers that should be enabled
27
+ servers = {
28
+ -- no this poop
29
+ tailwindcss = false ,
30
+ -- Enable rust_analyzer
31
+ rust_analyzer = true ,
31
32
32
- -- Enable tsserver w/custom settings
33
- tsserver = {},
34
- -- See Cosmic defaults lsp/providers/null_ls.lua and https://github.com/jose-elias-alvarez/null-ls.nvim/
35
- -- If adding additional sources, be sure to also copy the defaults that you would like to preserve from lsp/providers/null_ls.lua
36
- null_ls = {
37
- -- Disable default list of sources provided by CosmicNvim
38
- default_cosmic_sources = false ,
39
- -- disable formatting
40
- format = false ,
41
- -- Add additional sources here
42
- get_sources = function ()
43
- local null_ls = require (" null-ls" )
44
- return {
45
- null_ls .builtins .diagnostics .shellcheck ,
46
- null_ls .builtins .diagnostics .actionlint .with ({
47
- condition = function ()
48
- local cwd = vim .fn .expand (" %:p:." )
49
- return cwd :find (" .github/workflows" )
50
- end ,
51
- }),
52
- }
53
- end ,
54
- },
55
- },
56
- -- See Cosmic defaults lua/plugins/nvim-lsp-ts-utils/setup.lua
57
- ts_utils = {},
58
- },
33
+ -- Enable tsserver w/custom settings
34
+ tsserver = {},
35
+ -- See Cosmic defaults lsp/providers/null_ls.lua and https://github.com/jose-elias-alvarez/null-ls.nvim/
36
+ -- If adding additional sources, be sure to also copy the defaults that you would like to preserve from lsp/providers/null_ls.lua
37
+ null_ls = {
38
+ -- Disable default list of sources provided by CosmicNvim
39
+ default_cosmic_sources = false ,
40
+ -- disable formatting
41
+ format = false ,
42
+ -- Add additional sources here
43
+ get_sources = function ()
44
+ local null_ls = require (' null-ls' )
45
+ return {
46
+ null_ls .builtins .diagnostics .shellcheck ,
47
+ null_ls .builtins .diagnostics .actionlint .with ({
48
+ condition = function ()
49
+ local cwd = vim .fn .expand (' %:p:.' )
50
+ return cwd :find (' .github/workflows' )
51
+ end ,
52
+ }),
53
+ }
54
+ end ,
55
+ },
56
+ },
57
+ -- See Cosmic defaults lua/plugins/nvim-lsp-ts-utils/setup.lua
58
+ ts_utils = {},
59
+ },
59
60
60
- -- adjust default plugin settings
61
- plugins = {
62
- -- See https://github.com/rmagatti/auto-session#%EF%B8%8F-configuration
63
- auto_session = {},
64
- -- https://github.com/numToStr/Comment.nvim#configuration-optional
65
- comment_nvim = {},
66
- -- See https://github.com/CosmicNvim/cosmic-ui#%EF%B8%8F-configuration
67
- cosmic_ui = {},
68
- -- See :h vim.diagnostic.config for all diagnostic configuration options
69
- diagnostic = {},
70
- -- See :h gitsigns-usage
71
- gitsigns = {},
72
- -- See https://git.sr.ht/~whynothugo/lsp_lines.nvim
73
- lsp_lines = {
74
- -- additional flag only for CosmicNvim
75
- -- true - loads plugin and is enabled at start
76
- -- false - loads plugin but is not enabled at start
77
- -- you may use <leader>ld to toggle
78
- enable_on_start = true ,
79
- },
80
- -- See https://github.com/ray-x/lsp_signature.nvim#full-configuration-with-default-values
81
- lsp_signature = {},
82
- -- See https://github.com/nvim-lualine/lualine.nvim#default-configuration
83
- lualine = {},
84
- -- See https://github.com/L3MON4D3/LuaSnip/blob/577045e9adf325e58f690f4d4b4a293f3dcec1b3/README.md#config
85
- luasnip = {},
86
- -- See :h telescope.setup
87
- telescope = {},
88
- -- See https://github.com/folke/todo-comments.nvim#%EF%B8%8F-configuration
89
- todo_comments = {},
90
- -- See :h nvim-treesitter-quickstart
91
- treesitter = {},
92
- -- See :h cmp-usage
93
- nvim_cmp = {},
94
- -- See :h nvim-tree.setup
95
- nvim_tree = {},
96
- dbtpal = {},
97
- },
61
+ -- adjust default plugin settings
62
+ plugins = {
63
+ -- See https://github.com/rmagatti/auto-session#%EF%B8%8F-configuration
64
+ auto_session = {},
65
+ -- https://github.com/numToStr/Comment.nvim#configuration-optional
66
+ comment_nvim = {},
67
+ -- See https://github.com/CosmicNvim/cosmic-ui#%EF%B8%8F-configuration
68
+ cosmic_ui = {},
69
+ -- See :h vim.diagnostic.config for all diagnostic configuration options
70
+ diagnostic = {},
71
+ -- See :h gitsigns-usage
72
+ gitsigns = {},
73
+ -- See https://git.sr.ht/~whynothugo/lsp_lines.nvim
74
+ lsp_lines = {
75
+ -- additional flag only for CosmicNvim
76
+ -- true - loads plugin and is enabled at start
77
+ -- false - loads plugin but is not enabled at start
78
+ -- you may use <leader>ld to toggle
79
+ enable_on_start = true ,
80
+ },
81
+ -- See https://github.com/ray-x/lsp_signature.nvim#full-configuration-with-default-values
82
+ lsp_signature = {},
83
+ -- See https://github.com/nvim-lualine/lualine.nvim#default-configuration
84
+ lualine = {},
85
+ -- See https://github.com/L3MON4D3/LuaSnip/blob/577045e9adf325e58f690f4d4b4a293f3dcec1b3/README.md#config
86
+ luasnip = {},
87
+ -- See :h telescope.setup
88
+ telescope = {},
89
+ -- See https://github.com/folke/todo-comments.nvim#%EF%B8%8F-configuration
90
+ todo_comments = {},
91
+ -- See :h nvim-treesitter-quickstart
92
+ treesitter = {},
93
+ -- See :h cmp-usage
94
+ nvim_cmp = {
95
+ opts = function (_ , opts )
96
+ table.insert (opts .sources , 1 , {
97
+ name = ' copilot' ,
98
+ group_index = 1 ,
99
+ priority = 100 ,
100
+ })
101
+ end ,
102
+ --[[ sources = { ]]
103
+ --[[ -- Copilot Source ]]
104
+ --[[ { name = 'copilot', group_index = 2 }, ]]
105
+ --[[ -- Other Sources ]]
106
+ --[[ { name = 'nvim_lsp', group_index = 2 }, ]]
107
+ --[[ { name = 'path', group_index = 2 }, ]]
108
+ --[[ { name = 'luasnip', group_index = 2 }, ]]
109
+ --[[ { name = 'buffer', group_index = 2 }, ]]
110
+ --[[ }, ]]
111
+ --[[ sorting = { ]]
112
+ --[[ priority_weight = 2, ]]
113
+ --[[ comparators = { ]]
114
+ --[[ require('copilot_cmp.comparators').prioritize, ]]
115
+ --[[ -- Below is the default comparitor list and order for nvim-cmp ]]
116
+ --[[ cmp.config.compare.offset, ]]
117
+ --[[ -- cmp.config.compare.scopes, --this is commented in nvim-cmp too ]]
118
+ --[[ cmp.config.compare.exact, ]]
119
+ --[[ cmp.config.compare.score, ]]
120
+ --[[ cmp.config.compare.recently_used, ]]
121
+ --[[ cmp.config.compare.locality, ]]
122
+ --[[ cmp.config.compare.kind, ]]
123
+ --[[ cmp.config.compare.sort_text, ]]
124
+ --[[ cmp.config.compare.length, ]]
125
+ --[[ cmp.config.compare.order, ]]
126
+ --[[ }, ]]
127
+ --[[ }, ]]
128
+ },
129
+ -- See :h nvim-tree.setup
130
+ nvim_tree = {},
131
+ },
98
132
99
- -- Disable plugins default enabled by CosmicNvim
100
- disable_builtin_plugins = {
101
- --[[
133
+ -- Disable plugins default enabled by CosmicNvim
134
+ disable_builtin_plugins = {
135
+ --[[
102
136
'auto-session',
103
137
'colorizer',
104
138
'comment-nvim',
@@ -115,71 +149,95 @@ local config = {
115
149
'todo-comments',
116
150
'treesitter',
117
151
]]
118
- },
152
+ },
119
153
120
- -- Add additional plugins (lazy.nvim)
121
- add_plugins = {
122
- { " github/copilot.vim" , lazy = false },
123
- { " fabi1cazenave/termopen.vim" , lazy = false },
124
- { " monkoose/parsley" , lazy = false },
125
- {
126
- " monkoose/nvlime" ,
127
- lazy = false ,
128
- requires = { { " monkoose/parsley" } },
129
- init = function ()
130
- vim .g .nvlime_config = {
131
- main_window = " left" ,
132
- }
133
- end ,
134
- },
135
- -- { 'hrsh7th/nvim-cmp', lazy = false },
136
- {
137
- " eraserhd/parinfer-rust" ,
138
- lazy = false ,
139
- --[[ opt = true, ]]
140
- --[[ rtp = 'target/release', ]]
141
- build = " cargo build --release" ,
142
- },
143
- -- 'ggandor/lightspeed.nvim',
144
- -- {
145
- -- 'romgrk/barbar.nvim',
146
- -- dependencies = { 'kyazdani42/nvim-web-devicons' },
147
- -- },
148
- --[[ { ]]
149
- --[[ 'PedramNavid/dbtpal', ]]
150
- --[[ lazy = false, ]]
151
- --[[ -- keys = {} ]]
152
- --[[ config = function() ]]
153
- --[[ local dbt = require('dbtpal') ]]
154
- --[[ dbt.setup({ ]]
155
- --[[ -- Path to the dbt executable ]]
156
- --[[ path_to_dbt = 'dbt', ]]
157
- --[[ ]]
158
- --[[ -- Path to the dbt project, if blank, will auto-detect ]]
159
- --[[ -- using currently open buffer for all sql,yml, and md files ]]
160
- --[[ path_to_dbt_project = '', ]]
161
- --[[ ]]
162
- --[[ -- Path to dbt profiles directory ]]
163
- --[[ path_to_dbt_profiles_dir = vim.fn.expand('~/.dbt'), ]]
164
- --[[ ]]
165
- --[[ -- Search for ref/source files in macros and models folders ]]
166
- --[[ extended_path_search = true, ]]
167
- --[[ ]]
168
- --[[ -- Prevent modifying sql files in target/(compiled|run) folders ]]
169
- --[[ protect_compiled_files = true, ]]
170
- --[[ }) ]]
171
- --[[ ]]
172
- --[[ -- Setup key mappings ]]
173
- --[[ vim.keymap.set('n', '<leader>drp', dbt.run_all) ]]
174
- --[[ vim.keymap.set('n', '<leader>dtf', dbt.test) ]]
175
- --[[ vim.keymap.set('n', '<leader>dm', require('dbtpal.telescope').dbt_picker) ]]
176
- --[[ ]]
177
- --[[ -- Enable Telescope Extension ]]
178
- --[[ require('telescope').load_extension('dbtpal') ]]
179
- --[[ end, ]]
180
- --[[ requires = { { 'nvim-lua/plenary.nvim' }, { 'nvim-telescope/telescope.nvim' } }, ]]
181
- --[[ }, ]]
182
- },
154
+ -- Add additional plugins (lazy.nvim)
155
+ add_plugins = {
156
+ {
157
+ ' zbirenbaum/copilot.lua' ,
158
+ cmd = ' Copilot' ,
159
+ event = ' InsertEnter' ,
160
+ config = function ()
161
+ require (' copilot' ).setup ({
162
+ suggestion = { enabled = false },
163
+ panel = { enabled = false },
164
+ })
165
+ end ,
166
+ },
167
+ {
168
+ ' zbirenbaum/copilot-cmp' ,
169
+ dependencies = ' copilot.lua' ,
170
+ opts = {},
171
+ config = function (_ , opts )
172
+ local copilot_cmp = require (' copilot_cmp' )
173
+ copilot_cmp .setup (opts )
174
+ -- attach cmp source whenever copilot attaches
175
+ -- fixes lazy-loading issues with the copilot cmp source
176
+ require (' lazyvim.util' ).lsp .on_attach (function (client )
177
+ if client .name == ' copilot' then
178
+ copilot_cmp ._on_insert_enter ({})
179
+ end
180
+ end )
181
+ end ,
182
+ },
183
+ --[[ { 'fabi1cazenave/termopen.vim', lazy = false }, ]]
184
+ --[[ { 'monkoose/parsley', lazy = false }, ]]
185
+ --[[ { ]]
186
+ --[[ 'monkoose/nvlime', ]]
187
+ --[[ lazy = false, ]]
188
+ --[[ requires = { { 'monkoose/parsley' } }, ]]
189
+ --[[ init = function() ]]
190
+ --[[ vim.g.nvlime_config = { ]]
191
+ --[[ main_window = 'left', ]]
192
+ --[[ } ]]
193
+ --[[ end, ]]
194
+ --[[ }, ]]
195
+ -- { 'hrsh7th/nvim-cmp', lazy = false },
196
+ --[[ { ]]
197
+ --[[ 'eraserhd/parinfer-rust', ]]
198
+ --[[ lazy = false, ]]
199
+ --[[ build = 'cargo build --release', ]]
200
+ --[[ }, ]]
201
+ -- 'ggandor/lightspeed.nvim',
202
+ -- {
203
+ -- 'romgrk/barbar.nvim',
204
+ -- dependencies = { 'kyazdani42/nvim-web-devicons' },
205
+ -- },
206
+ --[[ { ]]
207
+ --[[ 'PedramNavid/dbtpal', ]]
208
+ --[[ lazy = false, ]]
209
+ --[[ -- keys = {} ]]
210
+ --[[ config = function() ]]
211
+ --[[ local dbt = require('dbtpal') ]]
212
+ --[[ dbt.setup({ ]]
213
+ --[[ -- Path to the dbt executable ]]
214
+ --[[ path_to_dbt = 'dbt', ]]
215
+ --[[ ]]
216
+ --[[ -- Path to the dbt project, if blank, will auto-detect ]]
217
+ --[[ -- using currently open buffer for all sql,yml, and md files ]]
218
+ --[[ path_to_dbt_project = '', ]]
219
+ --[[ ]]
220
+ --[[ -- Path to dbt profiles directory ]]
221
+ --[[ path_to_dbt_profiles_dir = vim.fn.expand('~/.dbt'), ]]
222
+ --[[ ]]
223
+ --[[ -- Search for ref/source files in macros and models folders ]]
224
+ --[[ extended_path_search = true, ]]
225
+ --[[ ]]
226
+ --[[ -- Prevent modifying sql files in target/(compiled|run) folders ]]
227
+ --[[ protect_compiled_files = true, ]]
228
+ --[[ }) ]]
229
+ --[[ ]]
230
+ --[[ -- Setup key mappings ]]
231
+ --[[ vim.keymap.set('n', '<leader>drp', dbt.run_all) ]]
232
+ --[[ vim.keymap.set('n', '<leader>dtf', dbt.test) ]]
233
+ --[[ vim.keymap.set('n', '<leader>dm', require('dbtpal.telescope').dbt_picker) ]]
234
+ --[[ ]]
235
+ --[[ -- Enable Telescope Extension ]]
236
+ --[[ require('telescope').load_extension('dbtpal') ]]
237
+ --[[ end, ]]
238
+ --[[ requires = { { 'nvim-lua/plenary.nvim' }, { 'nvim-telescope/telescope.nvim' } }, ]]
239
+ --[[ }, ]]
240
+ },
183
241
}
184
242
185
243
return config
0 commit comments