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 {
|
||||
colorscheme = "material",
|
||||
lsp = {
|
||||
|
|
|
@ -37,6 +37,8 @@ return {
|
|||
"<Esc>:m .-2<CR>==g",
|
||||
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 = {
|
||||
["<leader>gf"] = { ":OpenInGHFile <CR>", desc = "Open in github" },
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
return {
|
||||
"Pocco81/auto-save.nvim",
|
||||
event = "BufEnter",
|
||||
event = "User AstroFile",
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
return {
|
||||
"jackMort/ChatGPT.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function() require("chatgpt").setup() end,
|
||||
dependencies = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
-- "jackMort/ChatGPT.nvim",
|
||||
-- event = "VeryLazy",
|
||||
-- config = function() require("chatgpt").setup() end,
|
||||
-- dependencies = {
|
||||
-- "MunifTanjim/nui.nvim",
|
||||
-- "nvim-lua/plenary.nvim",
|
||||
-- "nvim-telescope/telescope.nvim",
|
||||
-- },
|
||||
}
|
||||
|
|
|
@ -1,64 +1,13 @@
|
|||
return {
|
||||
-- "hrsh7th/cmp-nvim-lsp",
|
||||
-- "hrsh7th/cmp-nvim-lua",
|
||||
-- "hrsh7th/cmp-nvim-lsp-signature-help",
|
||||
-- "hrsh7th/cmp-vsnip",
|
||||
-- "hrsh7th/cmp-path",
|
||||
-- "hrsh7th/cmp-buffer",
|
||||
-- "hrsh7th/vim-vsnip",
|
||||
-- {
|
||||
-- "hrsh7th/nvim-cmp",
|
||||
-- config = function()
|
||||
-- -- Completion Plugin Setup
|
||||
-- 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,
|
||||
-- },
|
||||
"nvim-cmp",
|
||||
dependencies = {
|
||||
{
|
||||
"zbirenbaum/copilot-cmp",
|
||||
opts = {},
|
||||
},
|
||||
},
|
||||
opts = function(_, opts)
|
||||
local cmp = require "cmp"
|
||||
opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "copilot" } }))
|
||||
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 {
|
||||
"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 {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
"all",
|
||||
-- ensure_installed = "all",
|
||||
-- "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,
|
||||
highlight = {
|
||||
enable = true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue