copilot and start of vue setup
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
-- TODO: Read until 425 ish, LSPs, continue there
|
||||
-- TODO: Read until 817
|
||||
|
||||
-- "<leader>sh" to [s]earch the [h]elp documentation.
|
||||
|
||||
@@ -596,7 +596,30 @@ require('lazy').setup({
|
||||
-- https://github.com/pmizio/typescript-tools.nvim
|
||||
--
|
||||
-- But for many setups, the LSP (`ts_ls`) will work just fine
|
||||
-- ts_ls = {},
|
||||
ts_ls = {
|
||||
init_options = {
|
||||
plugins = {
|
||||
{
|
||||
notify_on_errorame = '@vue/typescript-plugin',
|
||||
location = '',
|
||||
languages = { 'vue' },
|
||||
},
|
||||
},
|
||||
},
|
||||
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
|
||||
},
|
||||
-- TODO: Something with this setup is not quite right
|
||||
volar = {
|
||||
cmd = { 'npm', 'vue-language-server', '--stdio' },
|
||||
init_options = {
|
||||
vue = { hybridMode = true },
|
||||
},
|
||||
},
|
||||
eslint = {},
|
||||
prettierd = {},
|
||||
-- TODO: end
|
||||
html = {},
|
||||
cssls = {},
|
||||
--
|
||||
|
||||
lua_ls = {
|
||||
@@ -631,6 +654,7 @@ require('lazy').setup({
|
||||
local ensure_installed = vim.tbl_keys(servers or {})
|
||||
vim.list_extend(ensure_installed, {
|
||||
'stylua', -- Used to format Lua code
|
||||
'vue-language-server',
|
||||
})
|
||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||
|
||||
@@ -687,7 +711,7 @@ require('lazy').setup({
|
||||
-- python = { "isort", "black" },
|
||||
--
|
||||
-- You can use 'stop_after_first' to run the first available formatter from the list
|
||||
-- javascript = { "prettierd", "prettier", stop_after_first = true },
|
||||
javascript = { 'eslint', 'prettierd' },
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -697,6 +721,8 @@ require('lazy').setup({
|
||||
event = 'VimEnter',
|
||||
version = '1.*',
|
||||
dependencies = {
|
||||
-- Copilot blink integration
|
||||
'fang2hou/blink-copilot',
|
||||
-- Snippet Engine
|
||||
{
|
||||
'L3MON4D3/LuaSnip',
|
||||
@@ -714,12 +740,12 @@ require('lazy').setup({
|
||||
-- `friendly-snippets` contains a variety of premade snippets.
|
||||
-- See the README about individual language/framework/plugin snippets:
|
||||
-- https://github.com/rafamadriz/friendly-snippets
|
||||
-- {
|
||||
-- 'rafamadriz/friendly-snippets',
|
||||
-- config = function()
|
||||
-- require('luasnip.loaders.from_vscode').lazy_load()
|
||||
-- end,
|
||||
-- },
|
||||
{
|
||||
'rafamadriz/friendly-snippets',
|
||||
config = function()
|
||||
require('luasnip.loaders.from_vscode').lazy_load()
|
||||
end,
|
||||
},
|
||||
},
|
||||
opts = {},
|
||||
},
|
||||
@@ -750,7 +776,7 @@ require('lazy').setup({
|
||||
-- <c-k>: Toggle signature help
|
||||
--
|
||||
-- See :h blink-cmp-config-keymap for defining your own keymap
|
||||
preset = 'default',
|
||||
preset = 'enter',
|
||||
|
||||
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
|
||||
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
|
||||
@@ -765,17 +791,28 @@ require('lazy').setup({
|
||||
completion = {
|
||||
-- By default, you may press `<c-space>` to show the documentation.
|
||||
-- Optionally, set `auto_show = true` to show the documentation after a delay.
|
||||
documentation = { auto_show = false, auto_show_delay_ms = 500 },
|
||||
documentation = { auto_show = true },
|
||||
accept = { create_undo_point = true, auto_brackets = { enabled = true } },
|
||||
ghost_text = { enabled = true },
|
||||
menu = { auto_show = true, enabled = true },
|
||||
},
|
||||
|
||||
sources = {
|
||||
default = { 'lsp', 'path', 'snippets', 'lazydev' },
|
||||
default = { 'copilot', 'lsp', 'path', 'lazydev', 'snippets' },
|
||||
|
||||
providers = {
|
||||
copilot = {
|
||||
name = 'copilot',
|
||||
module = 'blink-copilot',
|
||||
score_offset = 1000,
|
||||
async = true,
|
||||
max_items = 1,
|
||||
},
|
||||
lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 },
|
||||
},
|
||||
},
|
||||
|
||||
snippets = { preset = 'luasnip' },
|
||||
snippets = { preset = 'luasnip', score_offset = -100 },
|
||||
|
||||
-- Blink.cmp includes an optional, recommended rust fuzzy matcher,
|
||||
-- which automatically downloads a prebuilt binary when enabled.
|
||||
@@ -788,6 +825,8 @@ require('lazy').setup({
|
||||
|
||||
-- Shows a signature help window while you type arguments for a function
|
||||
signature = { enabled = true },
|
||||
-- enable on commandline
|
||||
cmdline = { enabled = true },
|
||||
},
|
||||
},
|
||||
|
||||
@@ -796,20 +835,16 @@ require('lazy').setup({
|
||||
-- change the command in the config to whatever the name of that colorscheme is.
|
||||
--
|
||||
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
||||
'folke/tokyonight.nvim',
|
||||
'catppuccin/nvim',
|
||||
name = 'catppuccin',
|
||||
priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||
config = function()
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
require('tokyonight').setup {
|
||||
styles = {
|
||||
comments = { italic = false }, -- Disable italics in comments
|
||||
},
|
||||
require('catppuccin').setup {
|
||||
flavour = 'mocha',
|
||||
}
|
||||
|
||||
-- Load the colorscheme here.
|
||||
-- Like many other themes, this one has different styles, and you could load
|
||||
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
||||
vim.cmd.colorscheme 'tokyonight-night'
|
||||
vim.cmd.colorscheme 'catppuccin'
|
||||
end,
|
||||
},
|
||||
|
||||
@@ -899,7 +934,7 @@ require('lazy').setup({
|
||||
-- This is the easiest way to modularize your config.
|
||||
--
|
||||
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
||||
-- { import = 'custom.plugins' },
|
||||
{ import = 'custom.plugins' },
|
||||
--
|
||||
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
|
||||
-- Or use telescope!
|
||||
|
||||
@@ -2,4 +2,35 @@
|
||||
-- I promise not to create any merge conflicts in this directory :)
|
||||
--
|
||||
-- See the kickstart.nvim README for more information
|
||||
return {}
|
||||
return {
|
||||
-- Configure copilot
|
||||
{
|
||||
'zbirenbaum/copilot.lua',
|
||||
cmd = 'Copilot',
|
||||
build = ':Copilot auth',
|
||||
event = 'InsertEnter',
|
||||
config = function()
|
||||
require('copilot').setup {
|
||||
suggestion = { enabled = false },
|
||||
panel = { enabled = false },
|
||||
filetypes = {
|
||||
markdown = true,
|
||||
help = true,
|
||||
},
|
||||
}
|
||||
|
||||
vim.api.nvim_create_autocmd('User', {
|
||||
pattern = 'BlinkCmpMenuOpen',
|
||||
callback = function()
|
||||
vim.b.copilot_suggestion_hidden = true
|
||||
end,
|
||||
})
|
||||
vim.api.nvim_create_autocmd('User', {
|
||||
pattern = 'BlinkCmpMenuClose',
|
||||
callback = function()
|
||||
vim.b.copilot_suggestion_hidden = false
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user