-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
61 lines (52 loc) · 1.84 KB
/
Copy pathinit.lua
File metadata and controls
61 lines (52 loc) · 1.84 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
require 'core.options'
require 'core.keymaps'
-- [[ Install `lazy.nvim` plugin manager ]]
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
local out = vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
if vim.v.shell_error ~= 0 then
error('Error cloning lazy.nvim:\n' .. out)
end
end
vim.opt.rtp:prepend(lazypath)
-- Import color theme based on environment variable NVIM_THEME
local default_color_scheme = 'nord'
local env_var_nvim_theme = os.getenv 'NVIM_THEME' or default_color_scheme
-- Define a table of theme modules
local themes = {
nord = 'plugins.themes.nord',
onedark = 'plugins.themes.onedark',
}
require('lazy').setup({
require(themes[env_var_nvim_theme]),
require 'plugins.neotree',
require 'plugins.colortheme',
require 'plugins.bufferline',
require 'plugins.lualine',
require 'plugins.treesitter',
require 'plugins.telescope',
require 'plugins.autocompletion',
require 'plugins.gitsigns',
require 'plugins.alpha',
require 'plugins.misc',
require 'plugins.indent-blankline',
require 'plugins.debug',
require 'plugins.vim-tmux-navigator',
require 'plugins.aerial'
})
vim.api.nvim_create_autocmd('LspAttach', {
callback = function(ev)
local client = vim.lsp.get_client_by_id(ev.data.client_id)
if client:supports_method('textDocument/completion') then
vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true })
end
end,
})
vim.diagnostic.config({
virtual_text = { current_line = true }
})
vim.lsp.enable({"lua-language-server", "clangd"})
-- vim.cmd("set completeopt+=noselect")
--vim.o.winborder = 'rounded'