-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
92 lines (87 loc) · 3.07 KB
/
Copy pathinit.lua
File metadata and controls
92 lines (87 loc) · 3.07 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
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",
"--branch=stable",
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
{ 'folke/tokyonight.nvim', lazy = false, priority = 1000, config = function()
vim.cmd.colorscheme('tokyonight')
end,
},
{ "folke/which-key.nvim", event = "VeryLazy" },
{ 'nvim-lualine/lualine.nvim', dependencies = { 'nvim-tree/nvim-web-devicons' }, config = function()
require('lualine').setup({ options = { theme = 'auto' } })
end,
},
{ "jghauser/mkdir.nvim", event = "BufWritePre" },
{ 'williamboman/mason.nvim', dependencies = {
'WhoIsSethDaniel/mason-tool-installer.nvim',
'jayp0521/mason-null-ls.nvim',
'neovim/nvim-lspconfig',
},
config = function()
require('mason').setup({})
require('mason-tool-installer').setup({ ensure_installed = { 'intelephense' }, auto_update = true })
require('lspconfig').intelephense.setup({ settings = { intelephense = { files = { maxSize = 5000000 } } } })
end,
},
{ "github/copilot.vim", lazy=false },
{ 'nvim-treesitter/nvim-treesitter', config = function()
require('nvim-treesitter.configs').setup({
ensure_installed = { "typescript", "tsx", "javascript", "php" },
highlight = { enable = true },
indent = { enable = true },
autotag = { enable = true },
context_commentstring = { enable = true },
incremental_selection = { enable = true },
refactor = { highlight_definitions = { enable = true } },
textobjects = {
select = {
enable = true,
keymaps = {
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
},
},
},
})
end,
},
{ 'stevearc/aerial.nvim', dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-lspconfig' }, config = function()
require('aerial').setup({
backends = { "lsp", "treesitter", "markdown" },
layout = { default_direction = "right" },
attach_mode = "global",
show_guides = true,
})
vim.keymap.set('n', '<Leader>a', '<cmd>AerialToggle!<CR>', { desc = 'Toggle Aerial' })
end,
lazy = true,
keys = { '<Leader>a' },
}
})
vim.opt.mouse = ""
vim.g.copilot_no_tab_map = true
vim.api.nvim_set_keymap("i", "<Tab>", 'copilot#Accept("<Tab>")', { expr = true, silent = true, noremap = true })
local diagnostics_visible = true
function ToggleDiagnostics()
diagnostics_visible = not diagnostics_visible
if diagnostics_visible then
vim.diagnostic.show()
print("LSP Diagnostics: ON")
else
vim.diagnostic.hide()
print("LSP Diagnostics: OFF")
end
end
vim.api.nvim_create_user_command("ToggleDiagnostics", ToggleDiagnostics, {})
vim.keymap.set("n", "<leader>d", ":ToggleDiagnostics<CR>", { noremap = true, silent = true })