-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinit.lua
More file actions
114 lines (105 loc) · 2.88 KB
/
init.lua
File metadata and controls
114 lines (105 loc) · 2.88 KB
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
-- @title Neovim init.lua (Lazy.nvim version)
-- @author Thomas Nichols
-- @date 2025-09-09
-- Bootstrap Lazy.nvim if not already installed
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',
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- List of plugins
local plugins = {
'nvim-lua/popup.nvim',
'nvim-lua/plenary.nvim',
'neovim/nvim-lspconfig',
'nvim-telescope/telescope.nvim',
'sudormrfbin/cheatsheet.nvim',
'nvim-lua/completion-nvim',
'kdheepak/JuliaFormatter.vim',
-- { 'neoclide/coc.nvim', branch = 'release' },
'williamboman/mason.nvim',
'williamboman/mason-lspconfig.nvim',
'simrat39/rust-tools.nvim',
'sharkdp/fd',
'tpope/vim-fugitive',
'tpope/vim-dispatch',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-nvim-lsp-signature-help',
'hrsh7th/cmp-nvim-lua',
'hrsh7th/cmp-path',
'hrsh7th/cmp-vsnip',
-- 'hrsh7th/nvim-cmp',
'hrsh7th/vim-vsnip',
'nvim-treesitter/nvim-treesitter',
'L3MON4D3/LuaSnip',
}
require('lazy').setup(plugins)
-- Rust Tools Setup (unchanged)
local rt = require("rust-tools")
rt.setup({
server = {
on_attach = function(_, bufnr)
vim.keymap.set("n", "", rt.hover_actions.hover_actions, { buffer = bufnr })
vim.keymap.set("n", "a", rt.code_action_group.code_action_group, { buffer = bufnr })
end,
},
})
-- nvim-cmp Setup (unchanged)
-- local cmp = require'cmp'
-- cmp.setup({
-- snippet = {
-- expand = function(args)
-- vim.fn["vsnip#anonymous"](args.body)
-- end,
-- },
-- weird nvim-cmp behaviour...
-- window = {
-- documentation = cmp.config.window.bordered(),
-- },
--
-- mapping = cmp.mapping.preset.insert({
-- [''] = cmp.mapping.select_prev_item(),
-- [''] = cmp.mappig.select_next_item(),
-- [''] = cmp.mapping.scroll_docs(-4),
-- [''] = cmp.mapping.scroll_docs(4),
-- [''] = cmp.mapping.complete(),
-- [''] = cmp.mapping.close(),
-- [''] = cmp.mapping.confirm({
-- behavior = cmp.ConfirmBehavior.Insert,
-- select = true,
-- }),
-- }),
sources = {
{ name = 'path' },
{ name = 'nvim_lsp', keyword_length = 3 },
{ name = 'nvim_lsp_signature_help' },
{ name = 'nvim_lua', keyword_length = 2 },
{ name = 'buffer', keyword_length = 2 },
{ name = 'vsnip', keyword_length = 2 },
{ name = 'calc' },
},
-- window = {
-- completion = cmp.config.window.bordered(),
-- documentation = cmp.config.window.bordered(),
-- },
-- formatting = {
-- fields = {'menu', 'abbr', 'kind'},
-- format = function(entry, item)
-- local menu_icon = {
-- nvim_lsp = 'λ',
-- vsnip = '⋗',
-- buffer = 'Ω',
-- path = '🖫',
-- }
-- item.menu = menu_icon[entry.source.name]
-- return item
-- end,
-- },
})