Compare commits
4
Commits
astronvim_v6
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5210270194 | ||
|
|
97f4f202f5 | ||
|
|
d100e2e2b8 | ||
|
|
1220cbf85f |
@@ -1,6 +1,6 @@
|
||||
# AstroNvim Template
|
||||
|
||||
**NOTE:** This is for AstroNvim v6+
|
||||
**NOTE:** This is for AstroNvim v5+
|
||||
|
||||
A template for getting started with [AstroNvim](https://github.com/AstroNvim/AstroNvim)
|
||||
|
||||
|
||||
@@ -1,18 +1,10 @@
|
||||
-- This file simply bootstraps the installation of Lazy.nvim and then calls other files for execution
|
||||
-- This file doesn't necessarily need to be touched, BE CAUTIOUS editing this file and proceed at your own risk.
|
||||
local lazypath = vim.env.LAZY or vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
|
||||
|
||||
if not (vim.env.LAZY or (vim.uv or vim.loop).fs_stat(lazypath)) then
|
||||
-- stylua: ignore
|
||||
local result = vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
-- stylua: ignore
|
||||
vim.api.nvim_echo({ { ("Error cloning lazy.nvim:\n%s\n"):format(result), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } }, true, {})
|
||||
vim.fn.getchar()
|
||||
vim.cmd.quit()
|
||||
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
||||
end
|
||||
end
|
||||
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- validate that lazy is available
|
||||
|
||||
+27
-28
@@ -28,12 +28,13 @@ return {
|
||||
-- { import = "astrocommunity.pack.html-css" },
|
||||
-- { import = "astrocommunity.pack.angular" },
|
||||
|
||||
{ import = "astrocommunity.pack.ansible" },
|
||||
{ import = "astrocommunity.pack.terraform" },
|
||||
{ import = "astrocommunity.pack.docker" },
|
||||
{ import = "astrocommunity.pack.helm" },
|
||||
-- { import = "astrocommunity.pack.ansible" },
|
||||
-- { import = "astrocommunity.pack.terraform" },
|
||||
-- { import = "astrocommunity.pack.docker" },
|
||||
-- { import = "astrocommunity.pack.helm" },
|
||||
|
||||
-- { import = "astrocommunity.pack.rainbow-delimiter-indent-blankline" },
|
||||
{ import = "astrocommunity.indent.indent-rainbowline" },
|
||||
|
||||
-- Recipes
|
||||
|
||||
@@ -48,19 +49,36 @@ return {
|
||||
-- Completion
|
||||
{ import = "astrocommunity.completion.blink-cmp-git" },
|
||||
{ import = "astrocommunity.completion.blink-cmp-emoji" },
|
||||
{ import = "astrocommunity.completion.cmp-nerdfont" },
|
||||
{ import = "astrocommunity.completion.copilot-lua-cmp" },
|
||||
-- { import = "astrocommunity.completion.cmp-nerdfont" },
|
||||
-- { import = "astrocommunity.completion.cmp-spell" },
|
||||
-- { import = "astrocommunity.completion.copilot-lua-cmp" },
|
||||
|
||||
-- AI
|
||||
{ import = "astrocommunity.ai.copilotchat-nvim" },
|
||||
-- { import = "astrocommunity.completion.minuet-ai-nvim" },
|
||||
{ import = "astrocommunity.ai.minuet-ai-nvim" },
|
||||
|
||||
-- Telescope
|
||||
{ import = "astrocommunity.terminal-integration.toggleterm-manager-nvim" }, -- A Telescope extension to manage Toggleterm's terminals in NeoVim
|
||||
-- { import = "astrocommunity.file-explorer.telescope-file-browser-nvim" },
|
||||
|
||||
-- Colorschemes
|
||||
-- Individual plugins (misc)
|
||||
|
||||
-- { import = "astrocommunity.workflow.hardtime-nvim" }, -- Display hints to get rid of bad habits
|
||||
{ import = "astrocommunity.motion.marks-nvim" }, -- Display marks in the sign column
|
||||
{ import = "astrocommunity.diagnostics.trouble-nvim" },
|
||||
{ import = "astrocommunity.editing-support.nvim-devdocs" },
|
||||
{ import = "astrocommunity.git.diffview-nvim" },
|
||||
{ import = "astrocommunity.markdown-and-latex.render-markdown-nvim" },
|
||||
-- { import = "astrocommunity.markdown-and-latex.markview-nvim" },
|
||||
{ import = "astrocommunity.programming-language-support.kulala-nvim" }, -- A minimal HTTP-client interface for Neovim
|
||||
|
||||
-- Disabled
|
||||
|
||||
-- { import = "astrocommunity.bars-and-lines.smartcolumn-nvim" }, -- display a column when text width exceed defined limit
|
||||
-- { import = "astrocommunity.editing-support.chatgpt-nvim" },
|
||||
-- { import = "astrocommunity.programming-language-support.rest-nvim" },
|
||||
-- { import = "astrocommunity.project.project-nvim" },
|
||||
|
||||
-- Individual plugins (colorschemes)
|
||||
{ import = "astrocommunity.colorscheme.vscode-nvim" },
|
||||
{ import = "astrocommunity.colorscheme.github-nvim-theme" },
|
||||
{ import = "astrocommunity.colorscheme.neosolarized-nvim" },
|
||||
@@ -71,25 +89,6 @@ return {
|
||||
{ import = "astrocommunity.colorscheme.tokyonight-nvim" },
|
||||
{ import = "astrocommunity.colorscheme.onedarkpro-nvim" },
|
||||
|
||||
-- Individual plugins (misc)
|
||||
|
||||
{ import = "astrocommunity.diagnostics.trouble-nvim" },
|
||||
{ import = "astrocommunity.motion.marks-nvim" }, -- Display marks in the sign column
|
||||
{ import = "astrocommunity.git.diffview-nvim" },
|
||||
{ import = "astrocommunity.markdown-and-latex.render-markdown-nvim" },
|
||||
-- { import = "astrocommunity.markdown-and-latex.markview-nvim" },
|
||||
{ import = "astrocommunity.programming-language-support.kulala-nvim" }, -- A minimal HTTP-client interface for Neovim
|
||||
{ import = "astrocommunity.indent.indent-rainbowline" },
|
||||
{ import = "astrocommunity.editing-support.nvim-devdocs" },
|
||||
-- { import = "astrocommunity.workflow.hardtime-nvim" }, -- Display hints to get rid of bad habits
|
||||
|
||||
-- Disabled
|
||||
|
||||
-- { import = "astrocommunity.bars-and-lines.smartcolumn-nvim" }, -- display a column when text width exceed defined limit
|
||||
-- { import = "astrocommunity.editing-support.chatgpt-nvim" },
|
||||
-- { import = "astrocommunity.programming-language-support.rest-nvim" },
|
||||
-- { import = "astrocommunity.project.project-nvim" },
|
||||
|
||||
-- Individual plugins customization
|
||||
-- {
|
||||
-- "nvim-treesitter/nvim-treesitter",
|
||||
|
||||
+5
-5
@@ -1,7 +1,7 @@
|
||||
require("lazy").setup({
|
||||
{
|
||||
"AstroNvim/AstroNvim",
|
||||
version = "^6", -- Remove version tracking to elect for nightly AstroNvim
|
||||
version = "^5", -- Remove version tracking to elect for nightly AstroNvim
|
||||
import = "astronvim.plugins",
|
||||
opts = { -- AstroNvim options must be set here with the `import` key
|
||||
mapleader = " ", -- This ensures the leader key must be configured before Lazy is set up
|
||||
@@ -20,13 +20,13 @@ require("lazy").setup({
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins, add more to your liking
|
||||
disabled_plugins = {
|
||||
-- disabled_plugins = {
|
||||
-- "gzip",
|
||||
-- "netrwPlugin",
|
||||
-- "tarPlugin",
|
||||
"tohtml",
|
||||
"zipPlugin",
|
||||
},
|
||||
-- "tohtml",
|
||||
-- "zipPlugin",
|
||||
-- },
|
||||
},
|
||||
},
|
||||
} --[[@as LazyConfig]])
|
||||
|
||||
+15
-10
@@ -93,15 +93,27 @@ return {
|
||||
-- Mappings can be configured through AstroCore as well.
|
||||
-- NOTE: keycodes follow the casing in the vimdocs. For example, `<Leader>` must be capitalized
|
||||
mappings = {
|
||||
-- first key is the mode
|
||||
|
||||
n = {
|
||||
-- second key is the lefthand side of the map
|
||||
|
||||
-- tables with just a `desc` key will be registered with which-key if it's installed
|
||||
-- this is useful for naming menus
|
||||
-- ["<Leader>b"] = { desc = "Buffers" },
|
||||
|
||||
-- setting a mapping to false will disable it
|
||||
-- ["<C-S>"] = false,
|
||||
|
||||
-- Visual selection of pasted text
|
||||
["gp"] = { "`[v`]", desc = "Visual selection of pasted text" },
|
||||
|
||||
-- navigate buffer tabs
|
||||
["]b"] = { function() require("astrocore.buffer").nav(vim.v.count1) end, desc = "Next buffer" },
|
||||
["[b"] = { function() require("astrocore.buffer").nav(-vim.v.count1) end, desc = "Previous buffer" },
|
||||
|
||||
-- mappings seen under group name "Buffer"
|
||||
["<Leader>b"] = { desc = "Buffers" },
|
||||
["<Leader>bn"] = { function() require("astrocore.buffer").nav(vim.v.count1) end, desc = "Next buffer" },
|
||||
["<Leader>bp"] = { function() require("astrocore.buffer").nav(-vim.v.count1) end, desc = "Previous buffer" },
|
||||
["<Leader>bd"] = {
|
||||
function()
|
||||
require("astroui.status.heirline").buffer_picker(
|
||||
@@ -113,13 +125,6 @@ return {
|
||||
["<Leader>bp"] = { function() require("astrocore.buffer").nav(-vim.v.count1) end, desc = "Previous buffer" },
|
||||
["<Leader>bn"] = { function() require("astrocore.buffer").nav(vim.v.count1) end, desc = "Next buffer" },
|
||||
|
||||
-- tables with just a `desc` key will be registered with which-key if it's installed
|
||||
-- this is useful for naming menus
|
||||
-- ["<Leader>b"] = { desc = "Buffers" },
|
||||
|
||||
-- setting a mapping to false will disable it
|
||||
-- ["<C-S>"] = false,
|
||||
|
||||
-- Normal mode : Custom mappings
|
||||
["<F2>"] = { "<cmd>Neotree toggle<cr>", desc = "File Explorer" }, -- F26 corresponds to <Ctrl+F2> on my keyboard
|
||||
["<F3>"] = {
|
||||
@@ -155,7 +160,7 @@ return {
|
||||
-- Clear Ctrl+l so that we can use it to clear the terminal
|
||||
["<C-l>"] = false,
|
||||
["<C-h>"] = false,
|
||||
-- Clear Ctrl-J and Ctrl-K so that we can use them to navigate the terminal (for lazygit)
|
||||
-- Clear Ctrl-J and Ctrl-K so that we can use them for apps running in the terminal (for example lazygit)
|
||||
["<C-j>"] = false,
|
||||
["<C-k>"] = false,
|
||||
-- My terms
|
||||
|
||||
@@ -41,18 +41,19 @@ return {
|
||||
servers = {
|
||||
-- "pyright"
|
||||
},
|
||||
-- customize language server configuration passed to `vim.lsp.config`
|
||||
-- client specific configuration can also go in `lsp/` in your configuration root (see `:h lsp-config`)
|
||||
-- customize language server configuration options passed to `lspconfig`
|
||||
---@diagnostic disable: missing-fields
|
||||
config = {
|
||||
-- ["*"] = { capabilities = {} }, -- modify default LSP client settings such as capabilities
|
||||
-- clangd = { capabilities = { offsetEncoding = "utf-8" } },
|
||||
},
|
||||
-- customize how language servers are attached
|
||||
handlers = {
|
||||
-- a function with the key `*` modifies the default handler, functions takes the server name as the parameter
|
||||
-- ["*"] = function(server) vim.lsp.enable(server) end
|
||||
-- a function without a key is simply the default handler, functions take two parameters, the server name and the configured options table for that server
|
||||
-- function(server, opts) require("lspconfig")[server].setup(opts) end
|
||||
|
||||
-- the key is the server that is being setup with `vim.lsp.config`
|
||||
-- the key is the server that is being setup with `lspconfig`
|
||||
-- rust_analyzer = false, -- setting a handler to false will disable the set up of that language server
|
||||
-- pyright = function(_, opts) require("lspconfig").pyright.setup(opts) end -- or a custom handler function can be passed
|
||||
},
|
||||
-- Configure buffer local auto commands to add when attaching a language server
|
||||
autocmds = {
|
||||
@@ -71,7 +72,7 @@ return {
|
||||
-- the rest of the autocmd options (:h nvim_create_autocmd)
|
||||
desc = "Refresh codelens (buffer)",
|
||||
callback = function(args)
|
||||
if require("astrolsp").config.features.codelens then vim.lsp.codelens.enable(true, { bufnr = args.buf }) end
|
||||
if require("astrolsp").config.features.codelens then vim.lsp.codelens.refresh { bufnr = args.buf } end
|
||||
end,
|
||||
},
|
||||
},
|
||||
@@ -89,13 +90,13 @@ return {
|
||||
function() require("astrolsp.toggles").buffer_semantic_tokens() end,
|
||||
desc = "Toggle LSP semantic highlight (buffer)",
|
||||
cond = function(client)
|
||||
return client:supports_method "textDocument/semanticTokens/full" and vim.lsp.semantic_tokens ~= nil
|
||||
return client.supports_method "textDocument/semanticTokens/full" and vim.lsp.semantic_tokens ~= nil
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
-- A custom `on_attach` function to be run after the default `on_attach` function
|
||||
-- takes two parameters `client` and `bufnr` (`:h lsp-attach`)
|
||||
-- takes two parameters `client` and `bufnr` (`:h lspconfig-setup`)
|
||||
on_attach = function(client, bufnr)
|
||||
-- this would disable semanticTokensProvider for all clients
|
||||
-- client.server_capabilities.semanticTokensProvider = nil
|
||||
|
||||
@@ -1,24 +1,15 @@
|
||||
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
|
||||
|
||||
-- Customize Treesitter
|
||||
-- --------------------
|
||||
-- Treesitter customizations are handled with AstroCore
|
||||
-- as nvim-treesitter simply provides a download utility for parsers
|
||||
|
||||
---@type LazySpec
|
||||
return {
|
||||
"AstroNvim/astrocore",
|
||||
---@type AstroCoreOpts
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
treesitter = {
|
||||
highlight = true, -- enable/disable treesitter based highlighting
|
||||
indent = true, -- enable/disable treesitter based indentation
|
||||
auto_install = true, -- enable/disable automatic installation of detected languages
|
||||
ensure_installed = {
|
||||
"lua",
|
||||
"vim",
|
||||
-- add more arguments for adding more treesitter parsers
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -49,12 +49,10 @@ return {
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
config = function(plugin, opts)
|
||||
require "astronvim.plugins.configs.luasnip"(plugin, opts) -- include the default astronvim config that calls the setup call
|
||||
-- add more custom luasnip configuration such as filetype extend or custom snippets
|
||||
local luasnip = require "luasnip"
|
||||
luasnip.filetype_extend("javascript", { "javascriptreact" })
|
||||
|
||||
-- include the default astronvim config that calls the setup call
|
||||
require "astronvim.plugins.configs.luasnip"(plugin, opts)
|
||||
end,
|
||||
},
|
||||
|
||||
|
||||
+8
-2
@@ -1,5 +1,11 @@
|
||||
if true then return end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
|
||||
|
||||
-- This will run last in the setup process.
|
||||
-- This is just pure lua so anything that doesn't
|
||||
-- fit in the normal config locations above can go here
|
||||
|
||||
-- Needed for python3 through mise
|
||||
-- Locate python3 using PATH
|
||||
local python_path = vim.fn.exepath "python3"
|
||||
if python_path == nil or python_path == "" then
|
||||
else
|
||||
vim.g.python3_host_prog = python_path
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user