mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-15 09:02:40 +02:00
fix: astronvim - fix copilot's completion by <tab>, add comments
This commit is contained in:
+1
-2
@@ -18,7 +18,7 @@ return {
|
|||||||
{ import = "astrocommunity.utility.noice-nvim" },
|
{ import = "astrocommunity.utility.noice-nvim" },
|
||||||
-- Fully featured & enhanced replacement for copilot.vim
|
-- Fully featured & enhanced replacement for copilot.vim
|
||||||
-- <Tab> work with both auto completion in cmp and copilot
|
-- <Tab> work with both auto completion in cmp and copilot
|
||||||
{ import = "astrocommunity.completion.copilot-lua" },
|
{ import = "astrocommunity.completion.copilot-lua-cmp" },
|
||||||
{ import = "astrocommunity.media.vim-wakatime" },
|
{ import = "astrocommunity.media.vim-wakatime" },
|
||||||
{ import = "astrocommunity.motion.leap-nvim" },
|
{ import = "astrocommunity.motion.leap-nvim" },
|
||||||
{ import = "astrocommunity.motion.flit-nvim" },
|
{ import = "astrocommunity.motion.flit-nvim" },
|
||||||
@@ -70,7 +70,6 @@ return {
|
|||||||
-- neovim
|
-- neovim
|
||||||
"vim",
|
"vim",
|
||||||
"lua",
|
"lua",
|
||||||
|
|
||||||
-- operation & cloud native
|
-- operation & cloud native
|
||||||
"dockerfile",
|
"dockerfile",
|
||||||
"hcl",
|
"hcl",
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
-- Mapping data with "desc" stored directly by vim.keymap.set().
|
||||||
|
--
|
||||||
|
-- Please use this mappings table to set keyboard mapping since this is the
|
||||||
|
-- lower level configuration and more robust one. (which-key will
|
||||||
|
-- automatically pick-up stored data by this setting.)
|
||||||
|
local utils = require "astronvim.utils"
|
||||||
|
return {
|
||||||
|
-- first key is the mode
|
||||||
|
n = {
|
||||||
|
-- second key is the lefthand side of the map
|
||||||
|
-- mappings seen under group name "Buffer"
|
||||||
|
["<leader>bn"] = { "<cmd>tabnew<cr>", desc = "New tab" },
|
||||||
|
-- quick save
|
||||||
|
["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command
|
||||||
|
["<leader>tp"] = { function() utils.toggle_term_cmd("ipython") end, desc = "ToggleTerm python" },
|
||||||
|
},
|
||||||
|
t = {
|
||||||
|
-- setting a mapping to false will disable it
|
||||||
|
-- ["<esc>"] = false,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,10 +1,37 @@
|
|||||||
{ pkgs, astronvim, ... }:
|
{ pkgs, astronvim, ... }:
|
||||||
|
|
||||||
# related folders:
|
###############################################################################
|
||||||
# nvim's config: `~/.config/nvim`
|
#
|
||||||
# astronvim's user configuration: `$XDG_CONFIG_HOME/astronvim/lua/user`
|
# AstroNvim's configuration and all its dependencies
|
||||||
# all plugins will be installed into(by lazy.nvim): `~/.local/share/nvim/`
|
#
|
||||||
# for details: https://astronvim.com/
|
# Related folders:
|
||||||
|
# nvim's config: `~/.config/nvim`
|
||||||
|
# astronvim's user configuration: `$XDG_CONFIG_HOME/astronvim/lua/user`
|
||||||
|
# all plugins will be installed into(by lazy.nvim): `~/.local/share/nvim/`
|
||||||
|
#
|
||||||
|
# For details: https://astronvim.com/
|
||||||
|
#
|
||||||
|
# Commands & shortcuts in AstroNvim
|
||||||
|
# Learn Neovim's Basics: `:Tutor`
|
||||||
|
# Opening file explorer: `<Space> + e`
|
||||||
|
# Focus Neotree to current file: `<Space> + o`
|
||||||
|
# Floating Terminal: `<Space> + tf`
|
||||||
|
# Horizontal Split Terminal: `<Space> + th`
|
||||||
|
# Vertical Split Terminal: `<Space> + tv`
|
||||||
|
# Opening LSP symbols: `<Space> + lS`
|
||||||
|
# Toggle buffer auto formatting: `<Space> + uf`
|
||||||
|
#
|
||||||
|
# Switching between windows: `<Ctrl> + h/j/k/l`
|
||||||
|
# Resizing windows: `<Ctrl> + Up/Down/Left/Right`
|
||||||
|
# Horizontal Split: `\`
|
||||||
|
# Vertical Split: `|`
|
||||||
|
# Next Buffer(Tab): `]b`
|
||||||
|
# Previous Buffer(Tab): `[b`
|
||||||
|
# Close Buffer: `<Space> + c`
|
||||||
|
# ......
|
||||||
|
# See https://astronvim.com/Basic%20Usage/walkthrough
|
||||||
|
#
|
||||||
|
#e#############################################################################
|
||||||
{
|
{
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
# base config
|
# base config
|
||||||
@@ -15,10 +42,10 @@
|
|||||||
};
|
};
|
||||||
# my cusotom astronvim config, astronvim will load it after base config
|
# my cusotom astronvim config, astronvim will load it after base config
|
||||||
# https://github.com/AstroNvim/AstroNvim/blob/v3.32.0/lua/astronvim/bootstrap.lua#L15-L16
|
# https://github.com/AstroNvim/AstroNvim/blob/v3.32.0/lua/astronvim/bootstrap.lua#L15-L16
|
||||||
"astronvim/lua/user/init.lua" = {
|
"astronvim/lua/user" = {
|
||||||
# update AstroNvim
|
# update AstroNvim
|
||||||
onChange = "${pkgs.neovim}/bin/nvim --headless +quitall";
|
onChange = "${pkgs.neovim}/bin/nvim --headless +quitall";
|
||||||
source = ./astronvim_user_init.lua;
|
source = ./astronvim_user;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -103,20 +130,24 @@
|
|||||||
# HTML/CSS/JSON/ESLint language servers extracted from vscode
|
# HTML/CSS/JSON/ESLint language servers extracted from vscode
|
||||||
nodePackages.vscode-langservers-extracted
|
nodePackages.vscode-langservers-extracted
|
||||||
|
|
||||||
#-- cloudnative
|
#-- CloudNative
|
||||||
nodePackages.dockerfile-language-server-nodejs
|
nodePackages.dockerfile-language-server-nodejs
|
||||||
terraform
|
terraform
|
||||||
terraform-ls
|
terraform-ls
|
||||||
jsonnet
|
jsonnet
|
||||||
jsonnet-language-server
|
jsonnet-language-server
|
||||||
|
|
||||||
#-- others
|
#-- Others
|
||||||
taplo # TOML language server / formatter / validator
|
taplo # TOML language server / formatter / validator
|
||||||
nodePackages.yaml-language-server
|
nodePackages.yaml-language-server
|
||||||
|
|
||||||
# common
|
#-- Misc
|
||||||
tree-sitter # common language parser/highlighter
|
tree-sitter # common language parser/highlighter
|
||||||
nodePackages.prettier # common code formatter
|
nodePackages.prettier # common code formatter
|
||||||
|
|
||||||
|
#-- Optional Requirements:
|
||||||
|
gdu # disk usage analyzer, required by AstroNvim
|
||||||
|
ripgrep # fast search tool, required by AstroNvim's '<leader>fw'(<leader> is space key)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user