many updates
This commit is contained in:
parent
f72e630f19
commit
0d35cfb65d
9 changed files with 92 additions and 74 deletions
7
init.lua
7
init.lua
|
@ -1,3 +1,10 @@
|
||||||
|
vim.cmd([[
|
||||||
|
augroup FileType_http
|
||||||
|
au!
|
||||||
|
au BufNewFile,BufRead *.http setfiletype http
|
||||||
|
augroup END
|
||||||
|
]])
|
||||||
|
|
||||||
return {
|
return {
|
||||||
colorscheme = "material",
|
colorscheme = "material",
|
||||||
lsp = {
|
lsp = {
|
||||||
|
|
|
@ -37,6 +37,8 @@ return {
|
||||||
"<Esc>:m .-2<CR>==g",
|
"<Esc>:m .-2<CR>==g",
|
||||||
desc = "Move the line down",
|
desc = "Move the line down",
|
||||||
},
|
},
|
||||||
|
["<leader>r"] = { function() require("rest-nvim").run() end, desc = "Send http request" },
|
||||||
|
["<leader>Q"] = { ":qa<CR>" ,desc = "Quit all"}
|
||||||
},
|
},
|
||||||
v = {
|
v = {
|
||||||
["<leader>gf"] = { ":OpenInGHFile <CR>", desc = "Open in github" },
|
["<leader>gf"] = { ":OpenInGHFile <CR>", desc = "Open in github" },
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
return {
|
return {
|
||||||
"Pocco81/auto-save.nvim",
|
"Pocco81/auto-save.nvim",
|
||||||
event = "BufEnter",
|
event = "User AstroFile",
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
return {
|
return {
|
||||||
"jackMort/ChatGPT.nvim",
|
-- "jackMort/ChatGPT.nvim",
|
||||||
event = "VeryLazy",
|
-- event = "VeryLazy",
|
||||||
config = function() require("chatgpt").setup() end,
|
-- config = function() require("chatgpt").setup() end,
|
||||||
dependencies = {
|
-- dependencies = {
|
||||||
"MunifTanjim/nui.nvim",
|
-- "MunifTanjim/nui.nvim",
|
||||||
"nvim-lua/plenary.nvim",
|
-- "nvim-lua/plenary.nvim",
|
||||||
"nvim-telescope/telescope.nvim",
|
-- "nvim-telescope/telescope.nvim",
|
||||||
},
|
-- },
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,64 +1,13 @@
|
||||||
return {
|
return {
|
||||||
-- "hrsh7th/cmp-nvim-lsp",
|
"nvim-cmp",
|
||||||
-- "hrsh7th/cmp-nvim-lua",
|
dependencies = {
|
||||||
-- "hrsh7th/cmp-nvim-lsp-signature-help",
|
{
|
||||||
-- "hrsh7th/cmp-vsnip",
|
"zbirenbaum/copilot-cmp",
|
||||||
-- "hrsh7th/cmp-path",
|
opts = {},
|
||||||
-- "hrsh7th/cmp-buffer",
|
},
|
||||||
-- "hrsh7th/vim-vsnip",
|
},
|
||||||
-- {
|
opts = function(_, opts)
|
||||||
-- "hrsh7th/nvim-cmp",
|
local cmp = require "cmp"
|
||||||
-- config = function()
|
opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "copilot" } }))
|
||||||
-- -- Completion Plugin Setup
|
end,
|
||||||
-- local cmp = require "cmp"
|
|
||||||
-- cmp.setup {
|
|
||||||
-- -- Enable LSP snippets
|
|
||||||
-- snippet = {
|
|
||||||
-- expand = function(args) vim.fn["vsnip#anonymous"](args.body) end,
|
|
||||||
-- },
|
|
||||||
-- mapping = {
|
|
||||||
-- ["<C-p>"] = cmp.mapping.select_prev_item(),
|
|
||||||
-- ["<C-n>"] = cmp.mapping.select_next_item(),
|
|
||||||
-- -- Add tab support
|
|
||||||
-- ["<S-Tab>"] = cmp.mapping.select_prev_item(),
|
|
||||||
-- ["<Tab>"] = cmp.mapping.select_next_item(),
|
|
||||||
-- ["<C-S-f>"] = cmp.mapping.scroll_docs(-4),
|
|
||||||
-- ["<C-f>"] = cmp.mapping.scroll_docs(4),
|
|
||||||
-- ["<C-Space>"] = cmp.mapping.complete(),
|
|
||||||
-- ["<C-e>"] = cmp.mapping.close(),
|
|
||||||
-- ["<CR>"] = cmp.mapping.confirm {
|
|
||||||
-- behavior = cmp.ConfirmBehavior.Insert,
|
|
||||||
-- select = true,
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
-- -- Installed sources:
|
|
||||||
-- sources = {
|
|
||||||
-- { name = "path" }, -- file paths
|
|
||||||
-- { name = "nvim_lsp", keyword_length = 3 }, -- from language server
|
|
||||||
-- { name = "nvim_lsp_signature_help" }, -- display function signatures with current parameter emphasized
|
|
||||||
-- { name = "nvim_lua", keyword_length = 2 }, -- complete neovim's Lua runtime API such vim.lsp.*
|
|
||||||
-- { name = "buffer", keyword_length = 2 }, -- source current buffer
|
|
||||||
-- { name = "vsnip", keyword_length = 2 }, -- nvim-cmp source for vim-vsnip
|
|
||||||
-- { name = "calc" }, -- source for math calculation
|
|
||||||
-- },
|
|
||||||
-- 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,
|
|
||||||
-- },
|
|
||||||
-- }
|
|
||||||
-- end,
|
|
||||||
-- },
|
|
||||||
}
|
}
|
||||||
|
|
15
plugins/copilot.lua
Normal file
15
plugins/copilot.lua
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
return {
|
||||||
|
"zbirenbaum/copilot.lua",
|
||||||
|
cmd = "Copilot",
|
||||||
|
event = "InsertEnter",
|
||||||
|
opts = {
|
||||||
|
filetypes = {
|
||||||
|
javascript = true,
|
||||||
|
typescript = true,
|
||||||
|
rust = true,
|
||||||
|
css = true,
|
||||||
|
scss = true,
|
||||||
|
["*"] = false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
return {
|
return {
|
||||||
"Almo7aya/openingh.nvim",
|
"Almo7aya/openingh.nvim",
|
||||||
event = "BufEnter",
|
event = "User AstroFile",
|
||||||
}
|
}
|
||||||
|
|
7
plugins/rest-nvim.lua
Normal file
7
plugins/rest-nvim.lua
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
return {
|
||||||
|
"rest-nvim/rest.nvim",
|
||||||
|
event = "User AstroFile",
|
||||||
|
requires = { "nvim-lua/plenary.nvim" },
|
||||||
|
opts = {},
|
||||||
|
}
|
||||||
|
|
|
@ -1,8 +1,46 @@
|
||||||
return {
|
return {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
opts = {
|
opts = {
|
||||||
"all",
|
-- "all",
|
||||||
-- ensure_installed = "all",
|
ensure_installed = {
|
||||||
|
"http",
|
||||||
|
"json",
|
||||||
|
"bash",
|
||||||
|
"css",
|
||||||
|
"diff",
|
||||||
|
"dockerfile",
|
||||||
|
"dot",
|
||||||
|
"git_rebase",
|
||||||
|
"gitattributes",
|
||||||
|
"html",
|
||||||
|
"java",
|
||||||
|
"javascript",
|
||||||
|
"jq",
|
||||||
|
"jsdoc",
|
||||||
|
"json5",
|
||||||
|
"kotlin",
|
||||||
|
"latex",
|
||||||
|
"make",
|
||||||
|
"markdown",
|
||||||
|
"markdown_inline",
|
||||||
|
"nix",
|
||||||
|
"passwd",
|
||||||
|
"prisma",
|
||||||
|
"proto",
|
||||||
|
"python",
|
||||||
|
"regex",
|
||||||
|
"rst",
|
||||||
|
"rust",
|
||||||
|
"scss",
|
||||||
|
"sql",
|
||||||
|
"svelte",
|
||||||
|
"terraform",
|
||||||
|
"toml",
|
||||||
|
"tsx",
|
||||||
|
"typescript",
|
||||||
|
"vue",
|
||||||
|
"yaml",
|
||||||
|
},
|
||||||
-- auto_install = true,
|
-- auto_install = true,
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue