Merge branch 'Refactoring'
This commit is contained in:
commit
7501cb3bb2
76 changed files with 2037 additions and 1095 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -5,4 +5,7 @@ config/vifm/Trash
|
|||
config/vifm/vifminfo.json
|
||||
config/lazygit/state.yml
|
||||
config/mpv/shaders
|
||||
|
||||
# locks
|
||||
**/*-lock.json
|
||||
config/spicetify/Backup
|
||||
|
|
|
|||
3
.gitmodules
vendored
3
.gitmodules
vendored
|
|
@ -7,3 +7,6 @@
|
|||
[submodule "config/foot/themes/catppuccin"]
|
||||
path = config/foot/themes/catppuccin
|
||||
url = https://github.com/catppuccin/foot.git
|
||||
[submodule "config/alacritty/themes/rose-pine"]
|
||||
path = config/alacritty/themes/rose-pine
|
||||
url = https://github.com/rose-pine/alacritty.git
|
||||
|
|
|
|||
8
config/LazyVim/.gitignore
vendored
Normal file
8
config/LazyVim/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
tt.*
|
||||
.tests
|
||||
doc/tags
|
||||
debug
|
||||
.repro
|
||||
foo.*
|
||||
*.log
|
||||
data
|
||||
15
config/LazyVim/.neoconf.json
Normal file
15
config/LazyVim/.neoconf.json
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"neodev": {
|
||||
"library": {
|
||||
"enabled": true,
|
||||
"plugins": true
|
||||
}
|
||||
},
|
||||
"neoconf": {
|
||||
"plugins": {
|
||||
"lua_ls": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2
config/LazyVim/init.lua
Normal file
2
config/LazyVim/init.lua
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
-- bootstrap lazy.nvim, LazyVim and your plugins
|
||||
require("config.lazy")
|
||||
3
config/LazyVim/lua/config/autocmds.lua
Normal file
3
config/LazyVim/lua/config/autocmds.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
-- Autocmds are automatically loaded on the VeryLazy event
|
||||
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||
-- Add any additional autocmds here
|
||||
3
config/LazyVim/lua/config/keymaps.lua
Normal file
3
config/LazyVim/lua/config/keymaps.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
-- Keymaps are automatically loaded on the VeryLazy event
|
||||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||
-- Add any additional keymaps here
|
||||
46
config/LazyVim/lua/config/lazy.lua
Normal file
46
config/LazyVim/lua/config/lazy.lua
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
-- bootstrap lazy.nvim
|
||||
-- stylua: ignore
|
||||
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
||||
end
|
||||
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- add LazyVim and import its plugins
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
-- import any extras modules here
|
||||
-- { import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
-- { import = "lazyvim.plugins.extras.lang.json" },
|
||||
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
|
||||
-- import/override with your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
defaults = {
|
||||
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||
lazy = false,
|
||||
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||
-- have outdated releases, which may break your Neovim install.
|
||||
version = false, -- always use the latest git commit
|
||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||
},
|
||||
install = { colorscheme = { "tokyonight", "habamax" } },
|
||||
checker = { enabled = true }, -- automatically check for plugin updates
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
-- "matchit",
|
||||
-- "matchparen",
|
||||
-- "netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"tutor",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
3
config/LazyVim/lua/config/options.lua
Normal file
3
config/LazyVim/lua/config/options.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
-- Options are automatically loaded before lazy.nvim startup
|
||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||
-- Add any additional options here
|
||||
266
config/LazyVim/lua/plugins/example.lua
Normal file
266
config/LazyVim/lua/plugins/example.lua
Normal file
|
|
@ -0,0 +1,266 @@
|
|||
-- since this is just an example spec, don't actually load anything here and return an empty spec
|
||||
-- stylua: ignore
|
||||
if true then return {} end
|
||||
|
||||
-- every spec file under config.plugins will be loaded automatically by lazy.nvim
|
||||
--
|
||||
-- In your plugin files, you can:
|
||||
-- * add extra plugins
|
||||
-- * disable/enabled LazyVim plugins
|
||||
-- * override the configuration of LazyVim plugins
|
||||
return {
|
||||
-- add gruvbox
|
||||
{ "ellisonleao/gruvbox.nvim" },
|
||||
|
||||
-- Configure LazyVim to load gruvbox
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "gruvbox",
|
||||
},
|
||||
},
|
||||
|
||||
-- change trouble config
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
-- opts will be merged with the parent spec
|
||||
opts = { use_diagnostic_signs = true },
|
||||
},
|
||||
|
||||
-- disable trouble
|
||||
{ "folke/trouble.nvim", enabled = false },
|
||||
|
||||
-- add symbols-outline
|
||||
{
|
||||
"simrat39/symbols-outline.nvim",
|
||||
cmd = "SymbolsOutline",
|
||||
keys = { { "<leader>cs", "<cmd>SymbolsOutline<cr>", desc = "Symbols Outline" } },
|
||||
config = true,
|
||||
},
|
||||
|
||||
-- override nvim-cmp and add cmp-emoji
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = { "hrsh7th/cmp-emoji" },
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
local cmp = require("cmp")
|
||||
opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "emoji" } }))
|
||||
end,
|
||||
},
|
||||
|
||||
-- change some telescope options and a keymap to browse plugin files
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
keys = {
|
||||
-- add a keymap to browse plugin files
|
||||
-- stylua: ignore
|
||||
{
|
||||
"<leader>fp",
|
||||
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
|
||||
desc = "Find Plugin File",
|
||||
},
|
||||
},
|
||||
-- change some options
|
||||
opts = {
|
||||
defaults = {
|
||||
layout_strategy = "horizontal",
|
||||
layout_config = { prompt_position = "top" },
|
||||
sorting_strategy = "ascending",
|
||||
winblend = 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add telescope-fzf-native
|
||||
{
|
||||
"telescope.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build = "make",
|
||||
config = function()
|
||||
require("telescope").load_extension("fzf")
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
-- add pyright to lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- pyright will be automatically installed with mason and loaded with lspconfig
|
||||
pyright = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add tsserver and setup with typescript.nvim instead of lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"jose-elias-alvarez/typescript.nvim",
|
||||
init = function()
|
||||
require("lazyvim.util").on_attach(function(_, buffer)
|
||||
-- stylua: ignore
|
||||
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
||||
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
||||
end)
|
||||
end,
|
||||
},
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- tsserver will be automatically installed with mason and loaded with lspconfig
|
||||
tsserver = {},
|
||||
},
|
||||
-- you can do any additional lsp server setup here
|
||||
-- return true if you don't want this server to be setup with lspconfig
|
||||
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
|
||||
setup = {
|
||||
-- example to setup with typescript.nvim
|
||||
tsserver = function(_, opts)
|
||||
require("typescript").setup({ server = opts })
|
||||
return true
|
||||
end,
|
||||
-- Specify * to use this function as a fallback for any server
|
||||
-- ["*"] = function(server, opts) end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
|
||||
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
|
||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
|
||||
-- add more treesitter parsers
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"html",
|
||||
"javascript",
|
||||
"json",
|
||||
"lua",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"query",
|
||||
"regex",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
|
||||
-- would overwrite `ensure_installed` with the new value.
|
||||
-- If you'd rather extend the default config, use the code below instead:
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
-- add tsx and treesitter
|
||||
vim.list_extend(opts.ensure_installed, {
|
||||
"tsx",
|
||||
"typescript",
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- the opts function can also be used to change the default opts:
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sections.lualine_x, "😄")
|
||||
end,
|
||||
},
|
||||
|
||||
-- or you can return new options to override all the defaults
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function()
|
||||
return {
|
||||
--[[add your custom lualine config here]]
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- use mini.starter instead of alpha
|
||||
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
|
||||
|
||||
-- add jsonls and schemastore ans setup treesitter for json, json5 and jsonc
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
|
||||
-- add any tools you want to have installed below
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"stylua",
|
||||
"shellcheck",
|
||||
"shfmt",
|
||||
"flake8",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Use <tab> for completion and snippets (supertab)
|
||||
-- first: disable default <tab> and <s-tab> behavior in LuaSnip
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
keys = function()
|
||||
return {}
|
||||
end,
|
||||
},
|
||||
-- then: setup supertab in cmp
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-emoji",
|
||||
},
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
local has_words_before = function()
|
||||
unpack = unpack or table.unpack
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
end
|
||||
|
||||
local luasnip = require("luasnip")
|
||||
local cmp = require("cmp")
|
||||
|
||||
opts.mapping = vim.tbl_extend("force", opts.mapping, {
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
-- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
|
||||
-- they way you will only jump inside the snippet region
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
# to the user's home directory starting with `~/`.
|
||||
import:
|
||||
# - /path/to/alacritty.yml
|
||||
- ~/.config/alacritty/themes/catppuccin/catppuccin-macchiato.yml
|
||||
- ~/.config/alacritty/themes/rose-pine/dist/rose-pine-moon.yml
|
||||
# Any items in the `env` entry below will be added as
|
||||
# environment variables. Some entries may override variables
|
||||
# set by alacritty itself.
|
||||
|
|
|
|||
1
config/alacritty/themes/rose-pine
Submodule
1
config/alacritty/themes/rose-pine
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 7c3625f3d0f34359ba114e09b1ba3f3c1bed399a
|
||||
|
|
@ -3,17 +3,13 @@ return {
|
|||
--Usefull vanilla remaps
|
||||
|
||||
["J"] = { "mzJ`z", desc = "Keep cursor in column while joining lines" },
|
||||
|
||||
--
|
||||
["<C-d>"] = { "<C-d>zz", desc = "Keep cursor centered while junping" },
|
||||
["<C-u>"] = { "<C-u>zz", desc = "Keep cursor centered while junping" },
|
||||
|
||||
-- Keep cursor centered while searching
|
||||
["n"] = { "nzzzv", desc = "Keep cursor centered while searching" },
|
||||
["N"] = { "Nzzzv", desc = "Keep cursor centered while searching" },
|
||||
|
||||
["Q"] = "<nop>",
|
||||
|
||||
-- Buffers
|
||||
["H"] = {
|
||||
function()
|
||||
|
|
@ -27,7 +23,6 @@ return {
|
|||
end,
|
||||
desc = "Next buffer",
|
||||
},
|
||||
|
||||
["<C-t>"] = { "<cmd>ToggleTerm<cr>", desc = "Toggle terminal" },
|
||||
["<leader>fn"] = false,
|
||||
["<leader>fo"] = false,
|
||||
|
|
@ -36,7 +31,6 @@ return {
|
|||
["<F10>"] = false,
|
||||
["<F11>"] = false,
|
||||
["<F12>"] = false,
|
||||
|
||||
["<F1>"] = {
|
||||
function()
|
||||
require("dap").terminate()
|
||||
|
|
@ -91,7 +85,6 @@ return {
|
|||
end,
|
||||
desc = "Debugger: clear breakpoint",
|
||||
},
|
||||
|
||||
["<leader>fp"] = {
|
||||
function()
|
||||
require("telescope").extensions.projects.projects()
|
||||
|
|
@ -110,33 +103,28 @@ return {
|
|||
end,
|
||||
desc = "Go to prev diagnostic",
|
||||
},
|
||||
|
||||
["<leader>Ch"] = {
|
||||
function()
|
||||
require("nvim-comment-frame").add_comment()
|
||||
end,
|
||||
desc = "Add a comment frame",
|
||||
},
|
||||
|
||||
["<leader>CH"] = {
|
||||
function()
|
||||
require("nvim-comment-frame").add_multiline_comment()
|
||||
end,
|
||||
desc = "Add a multiline comment frame",
|
||||
},
|
||||
|
||||
["<leader>Cd"] = {
|
||||
function()
|
||||
require("neogen").generate()
|
||||
end,
|
||||
desc = "Generate comment docstring",
|
||||
},
|
||||
|
||||
["<leader>ft"] = {
|
||||
"<cmd>TodoTrouble<CR>",
|
||||
desc = "Search TODOS",
|
||||
},
|
||||
|
||||
["<leader>r"] = {
|
||||
[[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]],
|
||||
desc = "Search and replace current word",
|
||||
|
|
@ -151,12 +139,10 @@ return {
|
|||
":s/",
|
||||
desc = "Search and replace",
|
||||
},
|
||||
|
||||
["p"] = {
|
||||
[["_dP]],
|
||||
desc = "Paste whitout lossing yanked text",
|
||||
},
|
||||
|
||||
-- move selection up and down
|
||||
["J"] = ":m '>+1<CR>gv=gv",
|
||||
["K"] = ":m '<-2<CR>gv=gv",
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
████ ███ █████ █████
|
||||
░░███ ░░░ ░░███ ░░███
|
||||
██████ ░███ ██████ ████ ███████ ░███ █████
|
||||
░░░░░███ ░███ ███░░███░░███ ███░░███ ░███░░███
|
||||
███████ ░███ ░███████ ░███ ░███ ░███ ░██████░
|
||||
███░░███ ░███ ░███░░░ ░███ ░███ ░███ ░███░░███
|
||||
░░████████ █████░░██████ █████░░████████ ████ █████
|
||||
░░░░░░░░ ░░░░░ ░░░░░░ ░░░░░ ░░░░░░░░ ░░░░ ░░░░░
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
-- Siable netrw
|
||||
vim.g.loaded = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
|
||||
-- native neovim config
|
||||
require("options")
|
||||
|
||||
-- keybindings config
|
||||
require("keys")
|
||||
|
||||
-- Autocmd config
|
||||
require("autocommands")
|
||||
|
||||
require("plugins")
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
local cmd = vim.api.nvim_create_autocmd
|
||||
|
||||
-- cmd({"BufNewFile", "BufFilePre", "BufRead"}, {
|
||||
-- pattern = {"*.md"},
|
||||
-- callback = function() vim.opt.filetype = "markdown" end
|
||||
-- })
|
||||
|
||||
cmd("InsertEnter",
|
||||
{pattern = "*", command = "norm zz", desc = "Center line on insert mode"})
|
||||
|
||||
-- highlight yank selection
|
||||
cmd("TextYankPost", {
|
||||
pattern = "*",
|
||||
callback = function() vim.highlight.on_yank() end,
|
||||
desc = "Highligth line on yank"
|
||||
})
|
||||
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
--[[
|
||||
|
||||
Modes:
|
||||
|
||||
| String value | Help page | Affected modes | Vimscript equivalent |
|
||||
| -------------|------------------|-----------------------------------------------|-----------------------|
|
||||
| '' | mapmode-nvo | Normal, Visual, Select, Operator-pending | :map |
|
||||
| 'n' | mapmode-n | Normal | :nmap |
|
||||
| 'v' | mapmode-v | Visual and Select | :vmap |
|
||||
| 's' | mapmode-s | Select | :smap |
|
||||
| 'x' | mapmode-x | Visual | :xmap |
|
||||
| 'o' | mapmode-o | Operator-pending | :omap |
|
||||
| '!' | mapmode-ic | Insert and Command-line | :map! |
|
||||
| 'i' | mapmode-i | Insert | :imap |
|
||||
| 'l' | mapmode-l | Insert, Command-line, Lang-Arg | :lmap |
|
||||
| 'c' | mapmode-c | Command-line | :cmap |
|
||||
| 't' | mapmode-t | Terminal | :tmap |
|
||||
|
||||
Define Mapping with:
|
||||
vim.keymap.set(mode, keys, action[, options])
|
||||
|
||||
--]]
|
||||
|
||||
-- Leader Key
|
||||
vim.g.mapleader = ' '
|
||||
|
||||
vim.keymap.set('n', "<CR>", ":noh<CR>", { desc = "Remove search Highlight", silent = true })
|
||||
|
||||
-- local function changeComment()
|
||||
-- local table = vim.opt.fo:get()
|
||||
-- local enabled = tagle.c == true && tagle.r == true && tagle.o == true
|
||||
-- end
|
||||
|
||||
vim.keymap.set('', "<Leader>tc", [[if &fo =~ 'cro' | set fo-=cro | else | set fo+=cro | endif]], { desc = "Toggle autocomments", silent = true })
|
||||
|
||||
vim.keymap.set('', "<Leader>ti", ":setlocal autoindent!<CR>", { desc = "toggle auto indent"})
|
||||
|
||||
vim.keymap.set('', "<Leader>ts", ":setlocal spell!<CR>", { desc = "Toggle spell checker", silent = true })
|
||||
|
||||
vim.keymap.set('t', '<ESC>', [[<C-\><C-n>]], { desc = "Exit terminal with Esc", silent = true })
|
||||
|
||||
vim.keymap.set('n', '<C-s>', ':w<CR>', { desc = "Save file", silent = true })
|
||||
|
||||
vim.keymap.set({ 'n', 'v', 'i' }, '<A-j>', ':m .+1<CR>==', { desc = "Move current line down", silent = true })
|
||||
|
||||
vim.keymap.set({ 'n', 'v', 'i' }, '<A-k>', ':m .-2<CR>==', { desc = "Move current line up", silent = true })
|
||||
|
||||
|
||||
vim.keymap.set('v', '<', '<gv', { desc = "Better indentation in visual mode", silent = true })
|
||||
|
||||
vim.keymap.set('v', '>', '>gv', { desc = "Better indentation in visual mode", silent = true })
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
--------------------------------------------------------------------------------
|
||||
-- Native Neovim Config --
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
--[[
|
||||
|
||||
vim.opt.{option} -> :set
|
||||
vim.opt_global.{option} -> :setglobal
|
||||
vim.opt_local.{option} -> :setlocal
|
||||
|
||||
--]]
|
||||
|
||||
|
||||
-- Set Shell
|
||||
vim.opt.shell = "/usr/bin/env bash"
|
||||
|
||||
vim.g.python3_host_prog = "/usr/bin/python3"
|
||||
|
||||
-- Keep the cursor centered by X rows from top / bottom
|
||||
vim.opt.scrolloff = 15
|
||||
|
||||
-- Use System clipboard
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
|
||||
-- Enable Mouse
|
||||
vim.opt.mouse = "a"
|
||||
|
||||
-- Set Numbers
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
-- Identation
|
||||
local indent = 2
|
||||
vim.opt.tabstop = indent
|
||||
vim.opt.shiftwidth = indent
|
||||
vim.opt.softtabstop = indent
|
||||
|
||||
-- Ignore case when searching
|
||||
vim.opt.ignorecase = true
|
||||
|
||||
-- Override the 'ignorecase' option if the search pattern contains case characters.
|
||||
vim.opt.smartcase = true
|
||||
|
||||
-- Wrap Search
|
||||
vim.opt.wrapscan = true
|
||||
|
||||
-- Autocompletion with 'wildchar'
|
||||
vim.opt.wildmode = "longest,list,full"
|
||||
|
||||
-- Fix Sppliting
|
||||
vim.opt.splitbelow = true
|
||||
vim.opt.splitright = true
|
||||
|
||||
-- Set undofile
|
||||
vim.opt.undofile = true
|
||||
vim.opt.undodir = os.getenv("HOME") .. "/.nvim/undo"
|
||||
vim.opt.undolevels = 1000
|
||||
|
||||
-- Open already open windows
|
||||
vim.opt.switchbuf = 'usetab'
|
||||
|
||||
-- Auto add comments on new line if prev was a comment
|
||||
vim.opt.fo:append({ cro = true })
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
-- luasnip setup
|
||||
local luasnip = require 'luasnip'
|
||||
local cmp = require 'cmp'
|
||||
|
||||
cmp.setup {
|
||||
snippet = {
|
||||
expand = function(args) require('luasnip').lsp_expand(args.body) end
|
||||
},
|
||||
mapping = {
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||
['<C-d>'] = 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.Replace,
|
||||
select = true
|
||||
},
|
||||
['<Tab>'] = function(fallback)
|
||||
if vim.fn.pumvisible() == 1 then
|
||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes('<C-n>', true,
|
||||
true, true), 'n')
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes(
|
||||
'<Plug>luasnip-expand-or-jump', true, true,
|
||||
true), '')
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end,
|
||||
['<S-Tab>'] = function(fallback)
|
||||
if vim.fn.pumvisible() == 1 then
|
||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes('<C-p>', true,
|
||||
true, true), 'n')
|
||||
elseif luasnip.jumpable(-1) then
|
||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes(
|
||||
'<Plug>luasnip-jump-prev', true, true, true),
|
||||
'')
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end
|
||||
},
|
||||
sources = {
|
||||
{name = 'nvim_lsp'}, {name = 'luasnip'}, {name = "nvim_lua"},
|
||||
{name = 'path'}, {name = 'buffer'}, {name = 'calc'},
|
||||
{name = 'treesitter'}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
require('nvim-autopairs').setup()
|
||||
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
local function config()
|
||||
require("bufferline").setup({
|
||||
options = {
|
||||
diagnostics = "nvim_lsp",
|
||||
diagnostics_update_in_insert = true,
|
||||
color_icons = true,
|
||||
show_close_icon = false
|
||||
}
|
||||
})
|
||||
|
||||
vim.keymap.set('n', 'H', ':BufferLineCyclePrev<CR>', { desc = "Go to prev buffer", silent = true })
|
||||
vim.keymap.set('n', 'L', ':BufferLineCycleNext<CR>', { desc = "Go to next buffer", silent = true })
|
||||
vim.keymap.set('n', '<Leader>c', ':bdelete<CR>', { desc = "Close current buffer", silent = true })
|
||||
vim.keymap.set('n', '<Leader>C', ':bdelete!<CR>', { desc = "Close current buffer whitout saving", silent = true })
|
||||
end
|
||||
|
||||
return {
|
||||
'akinsho/bufferline.nvim',
|
||||
tag = "v2.*",
|
||||
requires = 'kyazdani42/nvim-web-devicons',
|
||||
config = config
|
||||
}
|
||||
|
|
@ -1,81 +0,0 @@
|
|||
local function config()
|
||||
|
||||
local catppuccin = require("catppuccin")
|
||||
|
||||
vim.g.catppuccin_flavour = "mocha"
|
||||
|
||||
vim.cmd [[colorscheme catppuccin]]
|
||||
|
||||
-- configure it
|
||||
catppuccin.setup({
|
||||
transparent_background = true,
|
||||
term_colors = false,
|
||||
styles = {
|
||||
comments = {"italic"},
|
||||
conditionals = {"italic"},
|
||||
loops = {"italic"},
|
||||
functions = {"italic"},
|
||||
keywords = {"italic"},
|
||||
strings = {"italic"},
|
||||
variables = {"italic"},
|
||||
numbers = {},
|
||||
booleans = {},
|
||||
properties = {},
|
||||
types = {},
|
||||
operators = {}
|
||||
},
|
||||
integrations = {
|
||||
treesitter = true,
|
||||
native_lsp = {
|
||||
enabled = true,
|
||||
virtual_text = {
|
||||
errors = {"italic"},
|
||||
hints = {"italic"},
|
||||
warnings = {"italic"},
|
||||
information = {"italic"}
|
||||
},
|
||||
underlines = {
|
||||
errors = {"underline"},
|
||||
hints = {"underline"},
|
||||
warnings = {"underline"},
|
||||
information = {"underline"}
|
||||
}
|
||||
},
|
||||
lsp_trouble = true,
|
||||
cmp = true,
|
||||
lsp_saga = true,
|
||||
gitgutter = false,
|
||||
gitsigns = true,
|
||||
telescope = true,
|
||||
nvimtree = {
|
||||
enabled = true,
|
||||
show_root = true,
|
||||
transparent_panel = true
|
||||
},
|
||||
indent_blankline = {enabled = true, colored_indent_levels = true},
|
||||
neotree = {
|
||||
enabled = false,
|
||||
show_root = true,
|
||||
transparent_panel = false
|
||||
},
|
||||
dap = {enabled = false, enable_ui = false},
|
||||
which_key = true,
|
||||
dashboard = true,
|
||||
neogit = false,
|
||||
vim_sneak = false,
|
||||
fern = false,
|
||||
barbar = true,
|
||||
bufferline = true,
|
||||
markdown = true,
|
||||
lightspeed = false,
|
||||
ts_rainbow = true,
|
||||
hop = false,
|
||||
notify = true,
|
||||
telekasten = true,
|
||||
symbols_outline = true,
|
||||
mini = false
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
return {"catppuccin/nvim", as = "catppuccin", config = config}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
-- Default FZF
|
||||
vim.g.dashboard_default_executive = "telescope"
|
||||
|
||||
-- Custom Shortcuts
|
||||
-- TODO: Change this for telescope equivalents
|
||||
vim.api.nvim_set_keymap('n', '<Leader>db', ":DashboardJumpMark<CR>",
|
||||
{silent = true})
|
||||
vim.api.nvim_set_keymap('n', '<Leader>dh', ":DashboardFindHistory<CR>",
|
||||
{silent = true})
|
||||
vim.api.nvim_set_keymap('n', '<Leader>df', ":DashboardFindFile<CR>",
|
||||
{silent = true})
|
||||
vim.api.nvim_set_keymap('n', '<Leader>dn', ":DashboardNewFile<CR>",
|
||||
{silent = true})
|
||||
vim.api.nvim_set_keymap('n', '<Leader>da', ":DashboardFindWord<CR>",
|
||||
{silent = true})
|
||||
vim.api.nvim_set_keymap('n', '<Leader>dc', ":DashboardChangeColorscheme<CR>",
|
||||
{silent = true})
|
||||
|
||||
-- Show mappings
|
||||
vim.g.dashboard_custom_shortcut = {
|
||||
last_session = 'SPC s l',
|
||||
book_marks = 'SPC d b',
|
||||
find_history = 'SPC d h',
|
||||
find_file = 'SPC d f',
|
||||
new_file = 'SPC d n',
|
||||
find_word = 'SPC d a',
|
||||
change_colorscheme = 'SPC d c'
|
||||
}
|
||||
|
||||
-- Hide tabline on dashboard
|
||||
vim.cmd([[
|
||||
autocmd FileType dashboard set showtabline=0 | autocmd WinLeave <buffer> set showtabline=2
|
||||
]])
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
local focus = require("focus")
|
||||
|
||||
local options = {
|
||||
-- Completely disable this plugin
|
||||
-- Default: true
|
||||
enable = true,
|
||||
|
||||
-- Force width for the d window
|
||||
-- Default: Calculated based on golden ratio
|
||||
-- width = 120
|
||||
|
||||
-- Force height for the d window
|
||||
-- Default: Calculated based on golden ratio
|
||||
-- height = 40
|
||||
|
||||
-- Sets the width of directory tree buffers such as NerdTree, NvimTree and CHADTree
|
||||
-- Default: vim.g.nvim_tree_width or 30
|
||||
-- treewidth = 20
|
||||
|
||||
-- Displays a cursorline in the ed window only
|
||||
-- Not displayed in uned windows
|
||||
-- Default: true
|
||||
-- cursorline = false
|
||||
|
||||
-- Displays a sign column in the ed window only
|
||||
-- Not displayed in uned windows
|
||||
-- Default: true
|
||||
-- signcolumn = false
|
||||
|
||||
-- Displays line numbers in the ed window only
|
||||
-- Not displayed in uned windows
|
||||
-- Default: true
|
||||
number = true,
|
||||
|
||||
-- Displays relative line numbers in the ed window only
|
||||
-- Not displayed in uned windows
|
||||
-- See :h relativenumber
|
||||
-- Default: false
|
||||
relativenumber = true,
|
||||
|
||||
-- Displays hybrid line numbers in the ed window only
|
||||
-- Not displayed in uned windows
|
||||
-- Combination of :h relativenumber, but also displays the line number of the current line only
|
||||
-- Default: false
|
||||
-- hybridnumber = true
|
||||
|
||||
-- Enable auto highlighting for ed/unfocussed windows
|
||||
-- Default: false
|
||||
winhighlight = true,
|
||||
}
|
||||
|
||||
----------------------------------------------------------------------
|
||||
-- Mappings --
|
||||
----------------------------------------------------------------------
|
||||
|
||||
local function focusmap(direction)
|
||||
vim.keymap.set("n", "<C-" .. direction .. ">", function()
|
||||
focus.split_command(direction)
|
||||
end, { desc = "Change or create focused window" })
|
||||
end
|
||||
|
||||
focusmap("h")
|
||||
focusmap("j")
|
||||
focusmap("k")
|
||||
focusmap("l")
|
||||
|
||||
return {
|
||||
"beauwilliams/focus.nvim",
|
||||
config = function()
|
||||
require("focus").setup(options)
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,91 +0,0 @@
|
|||
local mapper = require("nvim-mapper")
|
||||
|
||||
require('gitsigns').setup {
|
||||
signs = {
|
||||
add = {
|
||||
hl = 'GitSignsAdd',
|
||||
text = '│',
|
||||
numhl = 'GitSignsAddNr',
|
||||
linehl = 'GitSignsAddLn'
|
||||
},
|
||||
change = {
|
||||
hl = 'GitSignsChange',
|
||||
text = '│',
|
||||
numhl = 'GitSignsChangeNr',
|
||||
linehl = 'GitSignsChangeLn'
|
||||
},
|
||||
delete = {
|
||||
hl = 'GitSignsDelete',
|
||||
text = '_',
|
||||
numhl = 'GitSignsDeleteNr',
|
||||
linehl = 'GitSignsDeleteLn'
|
||||
},
|
||||
topdelete = {
|
||||
hl = 'GitSignsDelete',
|
||||
text = '‾',
|
||||
numhl = 'GitSignsDeleteNr',
|
||||
linehl = 'GitSignsDeleteLn'
|
||||
},
|
||||
changedelete = {
|
||||
hl = 'GitSignsChange',
|
||||
text = '~',
|
||||
numhl = 'GitSignsChangeNr',
|
||||
linehl = 'GitSignsChangeLn'
|
||||
}
|
||||
},
|
||||
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
|
||||
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
|
||||
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
|
||||
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
|
||||
keymaps = {
|
||||
-- Default keymap options
|
||||
noremap = true,
|
||||
|
||||
['n ]h'] = {
|
||||
expr = true,
|
||||
"&diff ? ']c' : '<cmd>lua require\"gitsigns.actions\".next_hunk()<CR>'"
|
||||
},
|
||||
['n [h'] = {
|
||||
expr = true,
|
||||
"&diff ? '[c' : '<cmd>lua require\"gitsigns.actions\".prev_hunk()<CR>'"
|
||||
},
|
||||
|
||||
['n <leader>gs'] = '<cmd>lua require"gitsigns".stage_hunk()<CR>',
|
||||
['v <leader>gs'] = '<cmd>lua require"gitsigns".stage_hunk({vim.fn.line("."), vim.fn.line("v")})<CR>',
|
||||
['n <leader>gu'] = '<cmd>lua require"gitsigns".undo_stage_hunk()<CR>',
|
||||
['n <leader>gr'] = '<cmd>lua require"gitsigns".reset_hunk()<CR>',
|
||||
['v <leader>gr'] = '<cmd>lua require"gitsigns".reset_hunk({vim.fn.line("."), vim.fn.line("v")})<CR>',
|
||||
['n <leader>gR'] = '<cmd>lua require"gitsigns".reset_buffer()<CR>',
|
||||
['n <leader>gp'] = '<cmd>lua require"gitsigns".preview_hunk()<CR>',
|
||||
['n <leader>gb'] = '<cmd>lua require"gitsigns".blame_line(true)<CR>',
|
||||
['n <leader>gS'] = '<cmd>lua require"gitsigns".stage_buffer()<CR>',
|
||||
['n <leader>gU'] = '<cmd>lua require"gitsigns".reset_buffer_index()<CR>',
|
||||
|
||||
-- Text objects
|
||||
['o ih'] = ':<C-U>lua require"gitsigns.actions".select_hunk()<CR>',
|
||||
['x ih'] = ':<C-U>lua require"gitsigns.actions".select_hunk()<CR>'
|
||||
},
|
||||
watch_index = {interval = 1000, follow_files = true},
|
||||
attach_to_untracked = true,
|
||||
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
|
||||
current_line_blame_opts = {
|
||||
virt_text = true,
|
||||
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
|
||||
delay = 1000
|
||||
},
|
||||
current_line_blame_formatter_opts = {relative_time = false},
|
||||
sign_priority = 6,
|
||||
update_debounce = 100,
|
||||
status_formatter = nil, -- Use default
|
||||
max_file_length = 40000,
|
||||
preview_config = {
|
||||
-- Options passed to nvim_open_win
|
||||
border = 'single',
|
||||
style = 'minimal',
|
||||
relative = 'cursor',
|
||||
row = 0,
|
||||
col = 1
|
||||
},
|
||||
diff_opts = {internal = true}, -- If vim.diff or luajit is present
|
||||
yadm = {enable = false}
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
local mapper = require("nvim-mapper")
|
||||
|
||||
require("harpoon").setup({
|
||||
global_settings = {save_on_toggle = false, save_on_change = true}
|
||||
})
|
||||
|
||||
-- Mark list
|
||||
mapper.map('n', '<Leader>mq',
|
||||
[[:lua require("harpoon.ui").toggle_quick_menu()<CR>]],
|
||||
{silent = true, noremap = true}, "harpoon", "quick_menu",
|
||||
"Open list of marked files")
|
||||
|
||||
-- Mark File
|
||||
mapper.map('n', '<Leader>ma', [[:lua require("harpoon.mark").add_file()<CR>]],
|
||||
{silent = true, noremap = true}, "harpoon", "add_file",
|
||||
"Add current file to mark list")
|
||||
|
||||
-- Open marked file
|
||||
mapper.map('n', '<Leader>mj', [[:lua require("harpoon.ui").nav_file(1)<CR>]],
|
||||
{silent = true, noremap = true}, "harpoon", "file_navigation_1",
|
||||
"Go to marked file 1")
|
||||
mapper.map('n', '<Leader>mk', [[:lua require("harpoon.ui").nav_file(2)<CR>]],
|
||||
{silent = true, noremap = true}, "harpoon", "file_navigation_2",
|
||||
"Go to marked file 2")
|
||||
mapper.map('n', '<Leader>ml', [[:lua require("harpoon.ui").nav_file(3)<CR>]],
|
||||
{silent = true, noremap = true}, "harpoon", "file_navigation_3",
|
||||
"Go to marked file 3")
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
local function config()
|
||||
|
||||
-- vim.opt.list = true
|
||||
-- vim.opt.listchars:append "space:⋅"
|
||||
-- vim.opt.listchars:append "eol:↴"
|
||||
|
||||
require("indent_blankline").setup {
|
||||
space_char_blankline = " ",
|
||||
show_current_context = true,
|
||||
show_current_context_start = false
|
||||
}
|
||||
|
||||
-- vim.g.indent_blankline_char_list = {"│"}
|
||||
-- vim.g.indentLine_enabled = 1
|
||||
vim.g.indent_blankline_show_trailing_blankline_indent = false
|
||||
vim.g.indent_blankline_filetype_exclude = {
|
||||
"help", "terminal", "dashboard", "nvim-tree"
|
||||
}
|
||||
vim.g.indent_blankline_buftype_exclude = {"terminal"}
|
||||
vim.g.indent_blankline_show_first_indent_level = false
|
||||
vim.g.indent_blankline_use_treesitter = true
|
||||
|
||||
end
|
||||
|
||||
return {"lukas-reineke/indent-blankline.nvim", config = config}
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
local active_plugins = {
|
||||
"focus",
|
||||
"colorscheme",
|
||||
"nvim-tree",
|
||||
"bufferline",
|
||||
"treesitter",
|
||||
"prettyfolds",
|
||||
"indent-lines",
|
||||
"lsp",
|
||||
"telescope",
|
||||
}
|
||||
|
||||
--[[
|
||||
Auto update plugins from outside neomvim
|
||||
nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync'
|
||||
--]]
|
||||
--
|
||||
local ensure_packer = function()
|
||||
local fn = vim.fn
|
||||
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--depth",
|
||||
"1",
|
||||
"https://github.com/wbthomason/packer.nvim",
|
||||
install_path,
|
||||
})
|
||||
vim.cmd([[packadd packer.nvim]])
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
local packer_bootstrap = ensure_packer()
|
||||
|
||||
require("packer").startup({
|
||||
function(use)
|
||||
use("wbthomason/packer.nvim")
|
||||
|
||||
for _, name in ipairs(active_plugins) do
|
||||
local ok, plugin = pcall(require, "plugins." .. name)
|
||||
if ok then
|
||||
use(plugin)
|
||||
else
|
||||
print("Error loading " .. name .. "In: " .. plugin)
|
||||
end
|
||||
end
|
||||
|
||||
if packer_bootstrap then
|
||||
require("packer").sync()
|
||||
end
|
||||
end,
|
||||
config = {
|
||||
display = {
|
||||
open_fn = function()
|
||||
return require("packer.util").float({ border = "single" })
|
||||
end,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
@ -1,160 +0,0 @@
|
|||
--[[
|
||||
|
||||
LSP Server: code completition, references for variables and other stuff.
|
||||
Linter: Code rules for consistency.
|
||||
Formatter: Code style for eye candy.
|
||||
Debugger: well... a debugger...
|
||||
|
||||
--]]
|
||||
|
||||
-- FIXME: Refactor this code so it's more readable
|
||||
|
||||
local function setup()
|
||||
local lsp = require("lsp-zero")
|
||||
local cmp = require("cmp")
|
||||
local null_ls = require("null-ls")
|
||||
-- local mason_null_ls = require("mason-null-ls")
|
||||
|
||||
lsp.preset("recommended")
|
||||
|
||||
lsp.nvim_workspace({
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
})
|
||||
|
||||
local cmp_select = { behavior = cmp.SelectBehavior.Select }
|
||||
|
||||
lsp.setup_nvim_cmp({
|
||||
mapping = lsp.defaults.cmp_mappings({
|
||||
["<C-p>"] = cmp.mapping.select_prev_item(cmp_select),
|
||||
["<C-n>"] = cmp.mapping.select_next_item(cmp_select),
|
||||
}),
|
||||
|
||||
sources = {
|
||||
{ name = "path" },
|
||||
{ name = "nvim_lsp", keyword_length = 3 },
|
||||
{ name = "luasnip", keyword_length = 2 },
|
||||
},
|
||||
})
|
||||
|
||||
lsp.set_preferences({
|
||||
set_lsp_keymaps = false,
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "K", function()
|
||||
vim.lsp.buf.hover()
|
||||
end, { desc = "Show lsp info of the symbol under the cursor", silent = true })
|
||||
vim.keymap.set("n", "gd", function()
|
||||
vim.lsp.buf.definition()
|
||||
end, { desc = "Go to definition", silent = true })
|
||||
vim.keymap.set("n", "gD", function()
|
||||
vim.lsp.buf.declaration()
|
||||
end, { desc = "Go to declaration", silent = true })
|
||||
vim.keymap.set("n", "gi", function()
|
||||
vim.lsp.buf.implementation()
|
||||
end, { desc = "Go to implementation", silent = true })
|
||||
vim.keymap.set("n", "go", function()
|
||||
vim.lsp.buf.type_definition()
|
||||
end, { desc = "Go to definition of the type", silent = true })
|
||||
vim.keymap.set("n", "gr", function()
|
||||
vim.lsp.buf.references()
|
||||
end, { desc = "List references in quickfix window", silent = true })
|
||||
vim.keymap.set("n", "K", function()
|
||||
vim.lsp.buf.signature_help()
|
||||
end, { desc = "Show signature", silent = true })
|
||||
vim.keymap.set("n", "<Leader>lr", function()
|
||||
vim.lsp.buf.rename()
|
||||
end, { desc = "Rename all references", silent = true })
|
||||
vim.keymap.set("n", "<Leader>la", function()
|
||||
vim.lsp.buf.code_action()
|
||||
end, { desc = "Code action", silent = true })
|
||||
vim.keymap.set("n", "<Leader>lj", function()
|
||||
vim.diagnostic.goto_next()
|
||||
end, { desc = "Go to next diagnostics", silent = true })
|
||||
vim.keymap.set("n", "<Leader>lk", function()
|
||||
vim.diagnostic.goto_prev()
|
||||
end, { desc = "Go to prev diagnostics", silent = true })
|
||||
|
||||
lsp.setup()
|
||||
|
||||
local null_linters = null_ls.builtins.diagnostics
|
||||
local null_formatters = null_ls.builtins.formatting
|
||||
|
||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
||||
|
||||
local lsp_formatting = function(bufnr)
|
||||
vim.lsp.buf.format({
|
||||
filter = function(client)
|
||||
-- apply whatever logic you want (in this example, we'll only use null-ls)
|
||||
return client.name == "null-ls"
|
||||
end,
|
||||
bufnr = bufnr,
|
||||
})
|
||||
end
|
||||
|
||||
null_ls.setup({
|
||||
on_attach = function(client, bufnr)
|
||||
if client.supports_method("textDocument/formatting") then
|
||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
group = augroup,
|
||||
buffer = bufnr,
|
||||
callback = function()
|
||||
-- TODO: use this when neovim 8.0 comes out
|
||||
lsp_formatting(bufnr)
|
||||
-- vim.lsp.buf.formatting_sync()
|
||||
end,
|
||||
})
|
||||
end
|
||||
end,
|
||||
|
||||
sources = {
|
||||
-- Linters --
|
||||
null_linters.eslint_d,
|
||||
null_linters.gitlint,
|
||||
null_linters.luacheck,
|
||||
null_linters.markdownlint,
|
||||
null_linters.shellcheck,
|
||||
null_linters.yamllint,
|
||||
null_linters.todo_comments,
|
||||
|
||||
-- Formatters --
|
||||
null_formatters.blade_formatter,
|
||||
null_formatters.blue,
|
||||
null_formatters.fixjson,
|
||||
null_formatters.phpcsfixer,
|
||||
null_formatters.prettierd,
|
||||
null_formatters.shfmt,
|
||||
null_formatters.sql_formatter,
|
||||
null_formatters.stylua,
|
||||
null_formatters.yamlfmt,
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
return {
|
||||
"VonHeikemen/lsp-zero.nvim",
|
||||
config = setup,
|
||||
requires = {
|
||||
-- LSP Support
|
||||
{ "neovim/nvim-lspconfig" },
|
||||
{ "williamboman/mason.nvim" },
|
||||
{ "williamboman/mason-lspconfig.nvim" },
|
||||
|
||||
-- Autocompletion
|
||||
{ "hrsh7th/nvim-cmp" },
|
||||
{ "hrsh7th/cmp-buffer" },
|
||||
{ "hrsh7th/cmp-path" },
|
||||
{ "saadparwaiz1/cmp_luasnip" },
|
||||
{ "hrsh7th/cmp-nvim-lsp" },
|
||||
{ "hrsh7th/cmp-nvim-lua" },
|
||||
|
||||
-- Snippets
|
||||
{ "L3MON4D3/LuaSnip" },
|
||||
{ "rafamadriz/friendly-snippets" },
|
||||
|
||||
-- Linters and Formatters
|
||||
{ "jose-elias-alvarez/null-ls.nvim" },
|
||||
-- { "jayp0521/mason-null-ls.nvim" },
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
},
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
local mapper = require("nvim-mapper")
|
||||
|
||||
require('nvim-comment-frame').setup({
|
||||
|
||||
-- if true, <leader>cf keymap will be disabled
|
||||
disable_default_keymap = true,
|
||||
|
||||
-- width of the comment frame
|
||||
frame_width = 70,
|
||||
|
||||
-- wrap the line after 'n' characters
|
||||
line_wrap_len = 50,
|
||||
|
||||
-- automatically indent the comment frame based on the line
|
||||
auto_indent = true,
|
||||
|
||||
-- add comment above the current line
|
||||
add_comment_above = true,
|
||||
|
||||
-- configurations for individual language goes here
|
||||
languages = {
|
||||
dosini = {
|
||||
start_str = ';;',
|
||||
end_str = ';;',
|
||||
fill_char = '*',
|
||||
auto_indent = false
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
mapper.map('n', '<Leader>ch',
|
||||
[[:lua require('nvim-comment-frame').add_comment()<CR>]],
|
||||
{silent = true, noremap = true}, "nvim-comment-frame", "one line",
|
||||
"Add one line header")
|
||||
mapper.map('n', '<Leader>cH',
|
||||
[[:lua require('nvim-comment-frame').add_multiline_comment()<CR>]],
|
||||
{silent = true, noremap = true}, "nvim-comment-frame", "multi line",
|
||||
"Add multi line header")
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
local mapper = require("nvim-mapper")
|
||||
-- don't close terminals on hidden
|
||||
vim.opt.hidden = true
|
||||
|
||||
require("toggleterm").setup {
|
||||
-- size can be a number or function which is passed the current terminal
|
||||
size = function(term)
|
||||
if term.direction == "horizontal" then
|
||||
return 15
|
||||
elseif term.direction == "vertical" then
|
||||
return vim.o.columns * 0.4
|
||||
end
|
||||
end,
|
||||
hide_numbers = true, -- hide the number column in toggleterm buffers
|
||||
shade_filetypes = {},
|
||||
shade_terminals = false,
|
||||
-- shading_factor = '<number>', -- the degree by which to darken to terminal colour, default: 1 for dark backgrounds, 3 for light
|
||||
start_in_insert = true,
|
||||
insert_mappings = true, -- whether or not the open mapping applies in insert mode
|
||||
persist_size = true,
|
||||
direction = 'float', -- 'vertical' | 'horizontal' | 'window' | 'float',
|
||||
close_on_exit = true, -- close the terminal window when the process exits
|
||||
shell = vim.o.shell, -- change the default shell
|
||||
-- This field is only relevant if direction is set to 'float'
|
||||
float_opts = {
|
||||
-- The border key is *almost* the same as 'nvim_win_open'
|
||||
-- see :h nvim_win_open for details on borders however
|
||||
-- the 'curved' border is a custom border type
|
||||
-- not natively supported but implemented in this plugin.
|
||||
border = 'single', -- 'single' | 'double' | 'shadow' | 'curved' | ... other options supported by win open
|
||||
width = math.ceil(vim.o.columns * 0.8),
|
||||
height = math.ceil(vim.o.lines * 0.6),
|
||||
winblend = 0,
|
||||
highlights = {border = "Normal", background = "Normal"}
|
||||
}
|
||||
}
|
||||
|
||||
-- Toggle Terminals
|
||||
mapper.map('n', '<Leader>mf', [[:1ToggleTerm<CR>]],
|
||||
{silent = true, noremap = true}, "Terminal", "toggle_term_1",
|
||||
"Toggle terminal 1")
|
||||
mapper.map('n', '<Leader>md', [[:2ToggleTerm<CR>]],
|
||||
{silent = true, noremap = true}, "Terminal", "toggle_term_2",
|
||||
"Toggle terminal 2")
|
||||
mapper.map('n', '<Leader>ms', [[:3ToggleTerm<CR>]],
|
||||
{silent = true, noremap = true}, "Terminal", "toggle_term_3",
|
||||
"Toggle terminal 3")
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
local function tree_config()
|
||||
local tree = require("nvim-tree")
|
||||
local tree_cb = require("nvim-tree.config").nvim_tree_callback
|
||||
|
||||
tree.setup({
|
||||
hijack_unnamed_buffer_when_opening = true,
|
||||
disable_netrw = true,
|
||||
hijack_netrw = true,
|
||||
hijack_cursor = true, -- cursor at the start of filename
|
||||
update_focused_file = {
|
||||
enable = true -- focus curren file
|
||||
},
|
||||
actions = { open_file = { quit_on_open = true } },
|
||||
renderer = {
|
||||
full_name = true, -- show remaining name in floating text
|
||||
group_empty = true, -- group empty folders
|
||||
add_trailing = true, -- Trailing slash to folders
|
||||
highlight_opened_files = "all",
|
||||
highlight_git = true
|
||||
},
|
||||
view = {
|
||||
centralize_selection = true, -- center current file on enter
|
||||
width = 30, -- N° of columns or %
|
||||
mappings = {
|
||||
custom_only = false,
|
||||
-- list of mappings to set on the tree manually
|
||||
list = {
|
||||
{ key = { "l", "<CR>", "o", "<2-LeftMouse>" }, action = "edit" },
|
||||
-- {key = {"L", "<2-RightMouse>", "<C-]>"}, action = "cd"},
|
||||
{ key = "s", action = "vsplit" },
|
||||
{ key = "v", action = "split" },
|
||||
{ key = "t", action = "tabnew" },
|
||||
{ key = { "h", "<BS>" }, action = "close_node" },
|
||||
{ key = "i", action = "toggle_dotfiles" },
|
||||
{ key = "I", action = "toggle_ignored" },
|
||||
{ key = { "<C-l>", "<C-CR>" }, cb = tree_cb("system_open") }
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
-- bindings
|
||||
vim.keymap.set("n", "<leader>e", ":NvimTreeToggle<CR>", { desc = "Toggle file tree", silent = true })
|
||||
vim.keymap.set("n", "<C-e>", ":NvimTreeToggle<CR>", { desc = "Toggle file tree", silent = true })
|
||||
end
|
||||
|
||||
return {
|
||||
'kyazdani42/nvim-tree.lua',
|
||||
config = tree_config,
|
||||
requires = {
|
||||
'kyazdani42/nvim-web-devicons' -- optional, for file icons
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
local function config() require('pretty-fold').setup({fill_char = " "}) end
|
||||
|
||||
return {'anuvyklack/pretty-fold.nvim', config = config}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
require("project_nvim").setup {
|
||||
-- Manual mode doesn't automatically change your root directory, so you have
|
||||
-- the option to manually do so using `:ProjectRoot` command.
|
||||
manual_mode = false,
|
||||
|
||||
-- Methods of detecting the root directory. **"lsp"** uses the native neovim
|
||||
-- lsp, while **"pattern"** uses vim-rooter like glob pattern matching. Here
|
||||
-- order matters: if one is not detected, the other is used as fallback. You
|
||||
-- can also delete or rearangne the detection methods.
|
||||
detection_methods = {"lsp", "pattern"},
|
||||
|
||||
-- All the patterns used to detect root dir, when **"pattern"** is in
|
||||
-- detection_methods
|
||||
patterns = {
|
||||
".git", "_darcs", ".hg", ".bzr", ".svn", "Makefile", "package.json"
|
||||
},
|
||||
|
||||
-- Table of lsp clients to ignore by name
|
||||
-- eg: { "efm", ... }
|
||||
ignore_lsp = {},
|
||||
|
||||
-- Don't calculate root dir on specific directories
|
||||
-- Ex: { "~/.cargo/*", ... }
|
||||
exclude_dirs = {},
|
||||
|
||||
-- Show hidden files in telescope
|
||||
show_hidden = false,
|
||||
|
||||
-- When set to false, you will get a message when project.nvim changes your
|
||||
-- directory.
|
||||
silent_chdir = false,
|
||||
|
||||
-- Path where project.nvim will store the project history for use in
|
||||
-- telescope
|
||||
datapath = vim.fn.stdpath("data")
|
||||
}
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
local function config()
|
||||
-- Telescope.nvim
|
||||
local telescope = require("telescope")
|
||||
local pickers = require("telescope.builtin")
|
||||
require("project_nvim").setup()
|
||||
|
||||
-- Extensions
|
||||
telescope.load_extension("projects")
|
||||
|
||||
-- Open Files
|
||||
vim.keymap.set("n", "<Leader>f", function()
|
||||
pickers.find_files()
|
||||
end, { silent = true, desc = "Find file" })
|
||||
|
||||
vim.keymap.set("n", "<Leader>Fp", function()
|
||||
telescope.extensions.projects.projects()
|
||||
end, { silent = true, desc = "Find project" })
|
||||
|
||||
-- List vim stuff
|
||||
vim.keymap.set("n", "<Leader>bf", function()
|
||||
pickers.buffers()
|
||||
end, { silent = true, desc = "Find buffers" })
|
||||
|
||||
-- List LSP Stuff
|
||||
vim.keymap.set("n", "<Leader>ld", function()
|
||||
pickers.diagnostics({ bufnr = 0 })
|
||||
end, { silent = true, desc = "Find diagnostics" })
|
||||
|
||||
vim.keymap.set("n", "<Leader>lD", function()
|
||||
pickers.diagnostics()
|
||||
end, { silent = true, desc = "Find diagnostics in all buffers" })
|
||||
|
||||
-- Config
|
||||
local telescope_actions = require("telescope.actions")
|
||||
telescope.setup({
|
||||
defaults = {
|
||||
entry_prefix = " ",
|
||||
selection_caret = "* ",
|
||||
file_ignore_patterns = { "%.env", "cache", ".xlsx" },
|
||||
mappings = {
|
||||
i = {
|
||||
["<C-j>"] = telescope_actions.move_selection_next,
|
||||
["<C-k>"] = telescope_actions.move_selection_previous,
|
||||
["<C-s>"] = telescope_actions.file_vsplit,
|
||||
["<C-v>"] = telescope_actions.file_split,
|
||||
["<ESC>"] = telescope_actions.close,
|
||||
},
|
||||
n = {
|
||||
["gg"] = telescope_actions.move_to_top,
|
||||
["G"] = telescope_actions.move_to_bottom,
|
||||
["s"] = telescope_actions.file_vsplit,
|
||||
["v"] = telescope_actions.file_split,
|
||||
},
|
||||
},
|
||||
path_display = {
|
||||
truncate = 1,
|
||||
},
|
||||
},
|
||||
-- Specific config
|
||||
pickers = {
|
||||
buffers = {
|
||||
sort_lastused = true,
|
||||
mappings = {
|
||||
i = { ["d"] = require("telescope.actions").delete_buffer },
|
||||
n = { ["<c-d>"] = require("telescope.actions").delete_buffer },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
branch = "0.1.x",
|
||||
requires = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"ahmedkhalf/project.nvim",
|
||||
},
|
||||
config = config,
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
local function config()
|
||||
|
||||
require('nvim-treesitter.configs').setup({
|
||||
ensure_installed = {
|
||||
"bash", "c", "comment", "cpp", "css", "dockerfile", "html",
|
||||
"javascript", "jsdoc", "json", "lua", "python", "query", "regex",
|
||||
"typescript", "yaml", "sql", "http", "php", "rust", "scss",
|
||||
"markdown", "dart"
|
||||
},
|
||||
highlight = {enable = true},
|
||||
indent = {enable = true},
|
||||
rainbow = {
|
||||
enable = true,
|
||||
extended_mode = true, -- Highlight also non-parentheses delimiters, boolean or table: lang -> boolean
|
||||
max_file_lines = 1000 -- Do not enable for files with more than 1000 lines, int
|
||||
}
|
||||
})
|
||||
|
||||
-- Treesitter Folding
|
||||
vim.api.nvim_create_autocmd({
|
||||
'BufEnter', 'BufAdd', 'BufNew', 'BufNewFile', 'BufWinEnter'
|
||||
}, {
|
||||
group = vim.api.nvim_create_augroup('TS_FOLD_WORKAROUND', {}),
|
||||
callback = function()
|
||||
vim.opt.foldmethod = 'expr'
|
||||
vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
return {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
run = function()
|
||||
require('nvim-treesitter.install').update({with_sync = true})
|
||||
end,
|
||||
config = config
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
require("ts-node-action").setup({})
|
||||
|
||||
vim.keymap.set({ "n" }, "<leader>lt", require("ts-node-action").node_action, { desc = "Trigger Node Action" })
|
||||
19
config/nvim/LICENSE.md
Normal file
19
config/nvim/LICENSE.md
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
130
config/nvim/README.md
Normal file
130
config/nvim/README.md
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
# kickstart.nvim
|
||||
|
||||
### Introduction
|
||||
|
||||
A starting point for Neovim that is:
|
||||
|
||||
* Small
|
||||
* Single-file (with examples of moving to multi-file)
|
||||
* Documented
|
||||
* Modular
|
||||
|
||||
This repo is meant to be used as by **YOU** to begin your Neovim journey; remove the things you don't use and add what you miss.
|
||||
|
||||
Distribution Alternatives:
|
||||
- [LazyVim](https://www.lazyvim.org/): A delightful distribution maintained by @folke (the author of lazy.nvim, the package manager used here)
|
||||
|
||||
### Installation
|
||||
|
||||
Kickstart.nvim targets *only* the latest ['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest ['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim. If you are experiencing issues, please make sure you have the latest versions.
|
||||
|
||||
* Backup your previous configuration
|
||||
* (Recommended) Fork this repo (so that you have your own copy that you can modify).
|
||||
* Clone the kickstart repo into `$HOME/.config/nvim/` (Linux/Mac) or `~/AppData/Local/nvim/` (Windows)
|
||||
* If you don't want to include it as a git repo, you can just clone it and then move the files to this location
|
||||
* Start Neovim (`nvim`) and allow `lazy.nvim` to complete installation.
|
||||
* Restart Neovim
|
||||
* **You're ready to go!**
|
||||
|
||||
Additional system requirements:
|
||||
- Make sure to review the readmes of the plugins if you are experiencing errors. In particular:
|
||||
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation) is required for multiple [telescope](https://github.com/nvim-telescope/telescope.nvim#suggested-dependencies) pickers.
|
||||
- See as well [Windows Installation](#Windows-Installation)
|
||||
|
||||
### Configuration And Extension
|
||||
|
||||
* Inside of your fork, feel free to modify any file you like! It's your fork!
|
||||
* Then there are two primary configuration options available:
|
||||
* Include the `lua/kickstart/plugins/*` files in your configuration.
|
||||
* Add new configuration in `lua/custom/plugins/*` files, which will be auto sourced using `lazy.nvim`
|
||||
* NOTE: To enable this, you need to uncomment `{ import = 'custom.plugins' }` in your `init.lua`
|
||||
|
||||
You can also merge updates/changes from the repo back into your fork, to keep up-to-date with any changes for the default configuration
|
||||
|
||||
#### Example: Adding an autopairs plugin
|
||||
|
||||
In the file: `lua/custom/plugins/autopairs.lua`, add:
|
||||
|
||||
```lua
|
||||
-- File: lua/custom/plugins/autopairs.lua
|
||||
|
||||
return {
|
||||
"windwp/nvim-autopairs",
|
||||
config = function()
|
||||
require("nvim-autopairs").setup {}
|
||||
end,
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
This will automatically install `nvim-autopairs` and enable it on startup. For more information, see documentation for [lazy.nvim](https://github.com/folke/lazy.nvim).
|
||||
|
||||
#### Example: Adding a file tree plugin
|
||||
|
||||
In the file: `lua/custom/plugins/filetree.lua`, add:
|
||||
|
||||
```lua
|
||||
-- Unless you are still migrating, remove the deprecated commands from v1.x
|
||||
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
|
||||
|
||||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
version = "*",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
config = function ()
|
||||
require('neo-tree').setup {}
|
||||
end,
|
||||
}
|
||||
```
|
||||
|
||||
This will install the tree plugin and add the command `:Neotree` for you. You can explore the documentation at [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim) for more information.
|
||||
|
||||
#### Example: Adding a file to change default options
|
||||
|
||||
To change default options, you can add a file in the `/after/plugin/` folder (see `:help load-plugins`) to include your own options, keymaps, autogroups, and more. The following is an example `defaults.lua` file (located at `$HOME/.config/nvim/after/plugin/defaults.lua`).
|
||||
|
||||
```lua
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc = '[S]earch [R]esume' })
|
||||
```
|
||||
|
||||
### Contribution
|
||||
|
||||
Pull-requests are welcome. The goal of this repo is not to create a Neovim configuration framework, but to offer a starting template that shows, by example, available features in Neovim. Some things that will not be included:
|
||||
|
||||
* Custom language server configuration (null-ls templates)
|
||||
* Theming beyond a default colorscheme necessary for LSP highlight groups
|
||||
|
||||
Each PR, especially those which increase the line count, should have a description as to why the PR is necessary.
|
||||
|
||||
### FAQ
|
||||
|
||||
* What should I do if I already have a pre-existing neovim configuration?
|
||||
* You should back it up, then delete all files associated with it.
|
||||
* This includes your existing init.lua and the neovim files in `~/.local` which can be deleted with `rm -rf ~/.local/share/nvim/`
|
||||
* You may also want to look at the [migration guide for lazy.nvim](https://github.com/folke/lazy.nvim#-migration-guide)
|
||||
* What if I want to "uninstall" this configuration:
|
||||
* See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information
|
||||
* Are there any cool videos about this plugin?
|
||||
* Current iteration of kickstart (coming soon)
|
||||
* Here is one about the previous iteration of kickstart: [video introduction to Kickstart.nvim](https://youtu.be/stqUbv-5u2s).
|
||||
|
||||
### Windows Installation
|
||||
|
||||
Installation may require installing build tools, and updating the run command for `telescope-fzf-native`
|
||||
|
||||
See `telescope-fzf-native` documentation for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation)
|
||||
|
||||
This requires:
|
||||
|
||||
- Install CMake, and the Microsoft C++ Build Tools on Windows
|
||||
|
||||
```lua
|
||||
{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }
|
||||
```
|
||||
|
||||
27
config/nvim/init.lua
Normal file
27
config/nvim/init.lua
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
-- Loadnoptions before anything
|
||||
require("aleidk.options")
|
||||
|
||||
-- Init PLugins
|
||||
|
||||
-- Install package manager https://github.com/folke/lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Load plugins
|
||||
require("lazy").setup("aleidk.plugins")
|
||||
|
||||
-- Rest of configuratin
|
||||
|
||||
require("aleidk.keymaps")
|
||||
require("aleidk.autocmds")
|
||||
require("aleidk.IDE")
|
||||
44
config/nvim/lua/aleidk/IDE/completion.lua
Normal file
44
config/nvim/lua/aleidk/IDE/completion.lua
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
-- nvim-cmp setup
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
|
||||
luasnip.config.setup({})
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete({}),
|
||||
["<CR>"] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
}),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
}),
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
},
|
||||
})
|
||||
3
config/nvim/lua/aleidk/IDE/init.lua
Normal file
3
config/nvim/lua/aleidk/IDE/init.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
require("aleidk.IDE.lsp")
|
||||
require("aleidk.IDE.completion")
|
||||
require("aleidk.IDE.null-ls")
|
||||
95
config/nvim/lua/aleidk/IDE/lsp.lua
Normal file
95
config/nvim/lua/aleidk/IDE/lsp.lua
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
-- LSP settings.
|
||||
-- This function gets run when an LSP connects to a particular buffer.
|
||||
local on_attach = function(_, bufnr)
|
||||
-- NOTE: Remember that lua is a real programming language, and as such it is possible
|
||||
-- to define small helper and utility functions so you don't have to repeat yourself
|
||||
-- many times.
|
||||
--
|
||||
-- In this case, we create a function that lets us more easily define mappings specific
|
||||
-- for LSP related items. It sets the mode, buffer and description for us each time.
|
||||
local nmap = function(keys, func, desc)
|
||||
if desc then
|
||||
desc = "LSP: " .. desc
|
||||
end
|
||||
|
||||
vim.keymap.set("n", keys, func, { buffer = bufnr, desc = desc })
|
||||
end
|
||||
|
||||
nmap("<leader>rn", vim.lsp.buf.rename, "[R]e[n]ame")
|
||||
nmap("<leader>ca", vim.lsp.buf.code_action, "[C]ode [A]ction")
|
||||
|
||||
nmap("gd", vim.lsp.buf.definition, "[G]oto [D]efinition")
|
||||
nmap("gr", require("telescope.builtin").lsp_references, "[G]oto [R]eferences")
|
||||
nmap("gI", vim.lsp.buf.implementation, "[G]oto [I]mplementation")
|
||||
nmap("<leader>D", vim.lsp.buf.type_definition, "Type [D]efinition")
|
||||
nmap("<leader>ds", require("telescope.builtin").lsp_document_symbols, "[D]ocument [S]ymbols")
|
||||
nmap("<leader>ws", require("telescope.builtin").lsp_dynamic_workspace_symbols, "[W]orkspace [S]ymbols")
|
||||
|
||||
-- See `:help K` for why this keymap
|
||||
nmap("K", vim.lsp.buf.hover, "Hover Documentation")
|
||||
nmap("<C-k>", vim.lsp.buf.signature_help, "Signature Documentation")
|
||||
|
||||
-- Lesser used LSP functionality
|
||||
nmap("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration")
|
||||
nmap("<leader>wa", vim.lsp.buf.add_workspace_folder, "[W]orkspace [A]dd Folder")
|
||||
nmap("<leader>wr", vim.lsp.buf.remove_workspace_folder, "[W]orkspace [R]emove Folder")
|
||||
nmap("<leader>wl", function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end, "[W]orkspace [L]ist Folders")
|
||||
|
||||
-- Create a command `:Format` local to the LSP buffer
|
||||
vim.api.nvim_buf_create_user_command(bufnr, "Format", function(_)
|
||||
vim.lsp.buf.format()
|
||||
end, { desc = "Format current buffer with LSP" })
|
||||
end
|
||||
|
||||
-- Enable the following language servers
|
||||
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
||||
--
|
||||
-- Add any additional override configuration in the following tables. They will be passed to
|
||||
-- the `settings` field of the server config. You must look up that documentation yourself.
|
||||
local servers = {
|
||||
bashls = {},
|
||||
cssls = {},
|
||||
dockerls = {},
|
||||
emmet_ls = {},
|
||||
html = {},
|
||||
pyright = {},
|
||||
rust_analyzer = {},
|
||||
sqlls = {},
|
||||
tsserver = {},
|
||||
yamlls = {},
|
||||
lua_ls = {
|
||||
Lua = {
|
||||
workspace = { checkThirdParty = false },
|
||||
telemetry = { enable = false },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Diagnostic keymaps
|
||||
-- vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, { desc = "Go to previous diagnostic message" })
|
||||
-- vim.keymap.set("n", "]d", vim.diagnostic.goto_next, { desc = "Go to next diagnostic message" })
|
||||
-- vim.keymap.set("n", "<leader>e", vim.diagnostic.open_float, { desc = "Open floating diagnostic message" })
|
||||
-- vim.keymap.set("n", "<leader>q", vim.diagnostic.setloclist, { desc = "Open diagnostics list" })
|
||||
|
||||
-- nvim-cmp supports additional completion capabilities, so broadcast that to servers
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities)
|
||||
|
||||
-- Ensure the servers above are installed
|
||||
local mason_lspconfig = require("mason-lspconfig")
|
||||
|
||||
mason_lspconfig.setup({
|
||||
ensure_installed = vim.tbl_keys(servers),
|
||||
})
|
||||
|
||||
mason_lspconfig.setup_handlers({
|
||||
function(server_name)
|
||||
require("lspconfig")[server_name].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
settings = servers[server_name],
|
||||
})
|
||||
end,
|
||||
})
|
||||
38
config/nvim/lua/aleidk/IDE/null-ls.lua
Normal file
38
config/nvim/lua/aleidk/IDE/null-ls.lua
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
-- Linter and formatter configuration
|
||||
|
||||
require("mason-null-ls").setup({
|
||||
handlers = {}, -- this make mason-null-ls to auto setup handlers
|
||||
ensure_installed = {
|
||||
"blade_formatter",
|
||||
"blue",
|
||||
"eslint_d",
|
||||
"fixjson",
|
||||
"gitlint",
|
||||
"intelephense",
|
||||
"markdownlint",
|
||||
"php-cs-fixer",
|
||||
"prettierd",
|
||||
"shellcheck",
|
||||
"shfmt",
|
||||
"sql-formatter",
|
||||
"stylua",
|
||||
"yamlint",
|
||||
},
|
||||
})
|
||||
|
||||
local null_ls = require("null-ls.builtins")
|
||||
|
||||
require("null-ls").setup({
|
||||
sources = {
|
||||
null_ls.formatting.prettierd.with({
|
||||
disabled_filetypes = { "markdown" },
|
||||
}),
|
||||
|
||||
null_ls.formatting.phpcsfixer.with({
|
||||
extra_args = {
|
||||
"--config",
|
||||
"$HOME/.config/php-cs-fixer-conf.php",
|
||||
},
|
||||
}),
|
||||
},
|
||||
})
|
||||
10
config/nvim/lua/aleidk/autocmds.lua
Normal file
10
config/nvim/lua/aleidk/autocmds.lua
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
-- [[ Highlight on yank ]]
|
||||
-- See `:help vim.highlight.on_yank()`
|
||||
local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true })
|
||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
callback = function()
|
||||
vim.highlight.on_yank()
|
||||
end,
|
||||
group = highlight_group,
|
||||
pattern = "*",
|
||||
})
|
||||
62
config/nvim/lua/aleidk/constants.lua
Normal file
62
config/nvim/lua/aleidk/constants.lua
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
return {
|
||||
icons = {
|
||||
misc = {
|
||||
pint = " ",
|
||||
},
|
||||
dap = {
|
||||
Stopped = { " ", "DiagnosticWarn", "DapStoppedLine" },
|
||||
Breakpoint = " ",
|
||||
BreakpointCondition = " ",
|
||||
BreakpointRejected = { " ", "DiagnosticError" },
|
||||
LogPoint = ".>",
|
||||
},
|
||||
diagnostics = {
|
||||
Error = " ",
|
||||
Warn = " ",
|
||||
Hint = " ",
|
||||
Info = " ",
|
||||
},
|
||||
git = {
|
||||
added = " ",
|
||||
modified = " ",
|
||||
removed = " ",
|
||||
},
|
||||
kinds = {
|
||||
Array = " ",
|
||||
Boolean = " ",
|
||||
Class = " ",
|
||||
Color = " ",
|
||||
Constant = " ",
|
||||
Constructor = " ",
|
||||
Copilot = " ",
|
||||
Enum = " ",
|
||||
EnumMember = " ",
|
||||
Event = " ",
|
||||
Field = " ",
|
||||
File = " ",
|
||||
Folder = " ",
|
||||
Function = " ",
|
||||
Interface = " ",
|
||||
Key = " ",
|
||||
Keyword = " ",
|
||||
Method = " ",
|
||||
Module = " ",
|
||||
Namespace = " ",
|
||||
Null = " ",
|
||||
Number = " ",
|
||||
Object = " ",
|
||||
Operator = " ",
|
||||
Package = " ",
|
||||
Property = " ",
|
||||
Reference = " ",
|
||||
Snippet = " ",
|
||||
String = " ",
|
||||
Struct = " ",
|
||||
Text = " ",
|
||||
TypeParameter = " ",
|
||||
Unit = " ",
|
||||
Value = " ",
|
||||
Variable = " ",
|
||||
},
|
||||
},
|
||||
}
|
||||
48
config/nvim/lua/aleidk/keymaps.lua
Normal file
48
config/nvim/lua/aleidk/keymaps.lua
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
-- [[ Basic Keymaps ]]
|
||||
|
||||
local function default(desc)
|
||||
return {
|
||||
silent = true,
|
||||
desc = desc,
|
||||
}
|
||||
end
|
||||
|
||||
-- Keymaps for better default experience
|
||||
-- See `:help vim.keymap.set()`
|
||||
vim.keymap.set({ "n", "v" }, "<Space>", "<Nop>", { silent = true })
|
||||
|
||||
-- Remap for dealing with word wrap
|
||||
vim.keymap.set("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||
vim.keymap.set("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||
|
||||
vim.keymap.set("n", "J", "mzJ`z", default("Keep cursor in column while joining lines"))
|
||||
|
||||
vim.keymap.set("n", "<C-d>", "<C-d>zz", default("Keep cursor centered while junping"))
|
||||
vim.keymap.set("n", "<C-u>", "<C-u>zz", default("Keep cursor centered while junping"))
|
||||
|
||||
vim.keymap.set("n", "n", "nzzzv", default("Keep cursor centered while searching"))
|
||||
vim.keymap.set("n", "N", "Nzzzv", default("Keep cursor centered while searching"))
|
||||
|
||||
vim.keymap.set("n", "Q", "<nop>", {})
|
||||
|
||||
vim.keymap.set("n", "<leader>lj", function()
|
||||
vim.diagnostic.goto_next()
|
||||
end, default("Go to next diagnostic"))
|
||||
vim.keymap.set("n", "<leader>lk", function()
|
||||
vim.diagnostic.goto_prev()
|
||||
end, default("Go to prev diagnostic"))
|
||||
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>r",
|
||||
[[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]],
|
||||
default("Search and replace current word")
|
||||
)
|
||||
|
||||
vim.keymap.set("n", "<leader>R", ":%s/", default("Search and replace in the whole file"))
|
||||
vim.keymap.set("v", "<leader>r", ":s/", default("Search and replace in selection"))
|
||||
|
||||
vim.keymap.set("v", "p", [["_dP]], default("Paste whitout lossing yanked text"))
|
||||
|
||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv", default("Move selection down"))
|
||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv", default("Move selection up"))
|
||||
45
config/nvim/lua/aleidk/options.lua
Normal file
45
config/nvim/lua/aleidk/options.lua
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
-- [[ Setting options ]]
|
||||
-- See `:help vim.o`
|
||||
|
||||
-- Set <space> as the leader key
|
||||
-- NOTE: Must happen before plugins are required (otherwise wrong leader will be used)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
-- Set highlight on search
|
||||
vim.o.hlsearch = false
|
||||
|
||||
-- Make line numbers default
|
||||
vim.wo.number = true
|
||||
|
||||
-- Enable mouse mode
|
||||
vim.o.mouse = "a"
|
||||
|
||||
-- Sync clipboard between OS and Neovim.
|
||||
-- Remove this option if you want your OS clipboard to remain independent.
|
||||
-- See `:help 'clipboard'`
|
||||
vim.o.clipboard = "unnamedplus"
|
||||
|
||||
-- Enable break indent
|
||||
vim.o.breakindent = true
|
||||
|
||||
-- Save undo history
|
||||
vim.o.undofile = true
|
||||
|
||||
-- Case insensitive searching UNLESS /C or capital in search
|
||||
vim.o.ignorecase = true
|
||||
vim.o.smartcase = true
|
||||
|
||||
-- Keep signcolumn on by default
|
||||
vim.wo.signcolumn = "yes"
|
||||
|
||||
-- Decrease update time
|
||||
vim.o.updatetime = 250
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 300
|
||||
|
||||
-- Set completeopt to have a better completion experience
|
||||
vim.o.completeopt = "menuone,noselect"
|
||||
|
||||
-- NOTE: You should make sure your terminal supports this
|
||||
vim.o.termguicolors = true
|
||||
8
config/nvim/lua/aleidk/plugins/blankline.lua
Normal file
8
config/nvim/lua/aleidk/plugins/blankline.lua
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
return {
|
||||
-- Add indentation guides even on blank lines
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
opts = {
|
||||
char = "┊",
|
||||
show_trailing_blankline_indent = false,
|
||||
},
|
||||
}
|
||||
57
config/nvim/lua/aleidk/plugins/bufferline.lua
Normal file
57
config/nvim/lua/aleidk/plugins/bufferline.lua
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
return {
|
||||
"akinsho/bufferline.nvim",
|
||||
event = "VeryLazy",
|
||||
after = "onedark",
|
||||
keys = {
|
||||
{ "<leader>bp", "<Cmd>BufferLineTogglePin<CR>", desc = "Toggle pin" },
|
||||
{ "<leader>bP", "<Cmd>BufferLineGroupClose ungrouped<CR>", desc = "Delete non-pinned buffers" },
|
||||
{ "<S-h>", "<cmd>BufferLineCyclePrev<cr>", desc = "Prev buffer" },
|
||||
{ "<S-l>", "<cmd>BufferLineCycleNext<cr>", desc = "Next buffer" },
|
||||
},
|
||||
dependencies = {
|
||||
{
|
||||
"echasnovski/mini.bufremove",
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>bd", function() require("mini.bufremove").delete(0, false) end, desc = "Delete Buffer" },
|
||||
{ "<leader>bD", function() require("mini.bufremove").delete(0, true) end, desc = "Delete Buffer (Force)" },
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
opts = {
|
||||
highlights = { separator = { bg = "NONE" } },
|
||||
options = {
|
||||
-- FIXME: Doesn't work with onedark pro colorscheme
|
||||
-- separator_style = "padded_slant",
|
||||
-- themable = true,
|
||||
close_command = function(n)
|
||||
require("mini.bufremove").delete(n, false)
|
||||
end,
|
||||
-- stylua: ignore
|
||||
right_mouse_command = function(n) require("mini.bufremove").delete(n, false) end,
|
||||
diagnostics = "nvim_lsp",
|
||||
diagnostics_indicator = function(_, _, diag)
|
||||
local icons = require("aleidk.constants").icons.diagnostics
|
||||
local ret = (diag.error and icons.Error .. diag.error .. " " or "")
|
||||
.. (diag.warning and icons.Warn .. diag.warning or "")
|
||||
return vim.trim(ret)
|
||||
end,
|
||||
offsets = {
|
||||
{
|
||||
filetype = "NvimTree",
|
||||
-- text = "nvim-tree",
|
||||
highlight = "Directory",
|
||||
text_align = "left",
|
||||
},
|
||||
},
|
||||
groups = {
|
||||
items = {
|
||||
require("bufferline.groups").builtin.pinned:with({ icon = "" }),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
require("bufferline").setup(opts)
|
||||
end,
|
||||
}
|
||||
32
config/nvim/lua/aleidk/plugins/colorscheme.lua
Normal file
32
config/nvim/lua/aleidk/plugins/colorscheme.lua
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
local colorscheme = "onedark"
|
||||
|
||||
return {
|
||||
"olimorris/onedarkpro.nvim",
|
||||
priority = 1000,
|
||||
opts = {
|
||||
options = {
|
||||
transparency = true, -- Use a transparentbackground?
|
||||
},
|
||||
colors = {
|
||||
bg = "#000000",
|
||||
fg = "#abb2bf",
|
||||
red = "#ef596f",
|
||||
orange = "#fab387",
|
||||
yellow = "#e5c07b",
|
||||
green = "#89ca78",
|
||||
cyan = "#2bbac5",
|
||||
blue = "#61afef",
|
||||
purple = "#d55fde",
|
||||
white = "#abb2bf",
|
||||
black = "#000000",
|
||||
gray = "#434852",
|
||||
highlight = "#e2be7d",
|
||||
comment = "#7f848e",
|
||||
none = "NONE",
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("onedarkpro").setup(opts)
|
||||
vim.cmd.colorscheme(colorscheme)
|
||||
end,
|
||||
}
|
||||
35
config/nvim/lua/aleidk/plugins/dashboard.lua
Normal file
35
config/nvim/lua/aleidk/plugins/dashboard.lua
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
return {
|
||||
"goolord/alpha-nvim",
|
||||
lazy = false,
|
||||
opts = function()
|
||||
local dashboard = require("alpha.themes.dashboard")
|
||||
|
||||
dashboard.section.header.val = {
|
||||
" ████ ███ █████ █████ ",
|
||||
" ░░███ ░░░ ░░███ ░░███ ",
|
||||
" ██████ ░███ ██████ ████ ███████ ░███ █████",
|
||||
" ░░░░░███ ░███ ███░░███░░███ ███░░███ ░███░░███ ",
|
||||
" ███████ ░███ ░███████ ░███ ░███ ░███ ░██████░ ",
|
||||
" ███░░███ ░███ ░███░░░ ░███ ░███ ░███ ░███░░███ ",
|
||||
"░░████████ █████░░██████ █████░░████████ ████ █████",
|
||||
" ░░░░░░░░ ░░░░░ ░░░░░░ ░░░░░ ░░░░░░░░ ░░░░ ░░░░░ ",
|
||||
}
|
||||
dashboard.section.header.opts.hl = "DashboardHeader"
|
||||
|
||||
dashboard.section.buttons.val = {
|
||||
dashboard.button("LDR f f", " Find File ", "<leader>ff"),
|
||||
dashboard.button("LDR e", "פּ File Explorer ", "<leader>fe"),
|
||||
dashboard.button("LDR LDR t", " Harpoon", "<leader><leader>t"),
|
||||
}
|
||||
|
||||
dashboard.section.footer.val =
|
||||
{ " ", " ", " ", "Nvim loaded " .. require("lazy").stats().count .. " plugins " }
|
||||
dashboard.section.footer.opts.hl = "DashboardFooter"
|
||||
|
||||
dashboard.config.layout[1].val = vim.fn.max({ 2, vim.fn.floor(vim.fn.winheight(0) * 0.2) })
|
||||
dashboard.config.layout[3].val = 5
|
||||
dashboard.config.opts.noautocmd = true
|
||||
|
||||
return dashboard.opts
|
||||
end,
|
||||
}
|
||||
35
config/nvim/lua/aleidk/plugins/gitsigns.lua
Normal file
35
config/nvim/lua/aleidk/plugins/gitsigns.lua
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
-- Adds git releated signs to the gutter, as well as utilities for managing changes
|
||||
return {
|
||||
"lewis6991/gitsigns.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
opts = {
|
||||
-- See `:help gitsigns.txt`
|
||||
signs = {
|
||||
add = { text = "▎" },
|
||||
change = { text = "▎" },
|
||||
delete = { text = "" },
|
||||
topdelete = { text = "" },
|
||||
changedelete = { text = "▎" },
|
||||
untracked = { text = "▎" },
|
||||
},
|
||||
on_attach = function(buffer)
|
||||
local gs = package.loaded.gitsigns
|
||||
|
||||
local function map(mode, l, r, desc)
|
||||
vim.keymap.set(mode, "<leader>g" .. l, r, { buffer = buffer, desc = desc })
|
||||
end
|
||||
|
||||
-- stylua: ignore start
|
||||
map("n", "j", gs.next_hunk, "Next Hunk")
|
||||
map("n", "k", gs.prev_hunk, "Prev Hunk")
|
||||
map({ "n", "v" }, "s", ":Gitsigns stage_hunk<CR>", "Stage Hunk")
|
||||
map({ "n", "v" }, "r", ":Gitsigns reset_hunk<CR>", "Reset Hunk")
|
||||
map("n", "u", gs.undo_stage_hunk, "Undo Stage Hunk")
|
||||
map("n", "R", gs.reset_buffer, "Reset Buffer")
|
||||
map("n", "p", gs.preview_hunk, "Preview Hunk")
|
||||
map("n", "l", function() gs.blame_line({ full = true }) end, "Blame Line")
|
||||
map("n", "d", gs.diffthis, "Diff This")
|
||||
map("n", "D", function() gs.diffthis("~") end, "Diff This ~")
|
||||
end,
|
||||
},
|
||||
}
|
||||
55
config/nvim/lua/aleidk/plugins/harpoon.lua
Normal file
55
config/nvim/lua/aleidk/plugins/harpoon.lua
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
return {
|
||||
"ThePrimeagen/harpoon",
|
||||
-- lazy = false,
|
||||
opts = {
|
||||
global_settings = {
|
||||
-- sets the marks upon calling `toggle` on the ui, instead of require `:w`.
|
||||
save_on_toggle = true,
|
||||
-- saves the harpoon file upon every change. disabling is unrecommended.
|
||||
save_on_change = true,
|
||||
-- sets harpoon to run the command immediately as it's passed to the terminal when calling `sendCommand`.
|
||||
enter_on_sendcmd = true,
|
||||
-- closes any tmux windows harpoon that harpoon creates when you close Neovim.
|
||||
tmux_autoclose_windows = false,
|
||||
-- filetypes that you want to prevent from adding to the harpoon list menu.
|
||||
excluded_filetypes = { "harpoon" },
|
||||
-- set marks specific to each git branch inside git repository
|
||||
mark_branch = false,
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("harpoon").setup(opts)
|
||||
|
||||
local mark = require("harpoon.mark")
|
||||
local ui = require("harpoon.ui")
|
||||
local telescope = require("telescope")
|
||||
|
||||
telescope.load_extension("harpoon")
|
||||
|
||||
local function map(key, func, desc)
|
||||
vim.keymap.set("n", "<leader><leader>" .. key, func, { desc = desc })
|
||||
end
|
||||
|
||||
map("n", mark.add_file, "Add mark")
|
||||
|
||||
map("t", ui.toggle_quick_menu, "Toogle UI")
|
||||
|
||||
map("j", function()
|
||||
ui.nav_file(1)
|
||||
end, "Navigate to file 1")
|
||||
|
||||
map("k", function()
|
||||
ui.nav_file(2)
|
||||
end, "Navigate to file 2")
|
||||
|
||||
map("l", function()
|
||||
ui.nav_file(3)
|
||||
end, "Navigate to file 3")
|
||||
|
||||
map("ñ", function()
|
||||
ui.nav_file(4)
|
||||
end, "Navigate to file 4")
|
||||
|
||||
map("T", "<CMD>Telescope harpoon marks<CR>", "Open marks in telescope")
|
||||
end,
|
||||
}
|
||||
59
config/nvim/lua/aleidk/plugins/init.lua
Normal file
59
config/nvim/lua/aleidk/plugins/init.lua
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
return {
|
||||
-- NOTE: First, some plugins that don't require any configuration
|
||||
|
||||
-- Git related plugins
|
||||
"tpope/vim-fugitive",
|
||||
"tpope/vim-rhubarb",
|
||||
|
||||
-- Detect tabstop and shiftwidth automatically
|
||||
"tpope/vim-sleuth",
|
||||
|
||||
{
|
||||
-- LSP Configuration & Plugins
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
-- Automatically install LSPs to stdpath for neovim
|
||||
{ "williamboman/mason.nvim", config = true },
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
|
||||
-- Useful status updates for LSP
|
||||
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
||||
{ "j-hui/fidget.nvim", opts = {} },
|
||||
|
||||
-- Additional lua configuration, makes nvim stuff amazing!
|
||||
{ "folke/neodev.nvim", opts = {} },
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
-- Autocompletion
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = { "hrsh7th/cmp-nvim-lsp", "L3MON4D3/LuaSnip", "saadparwaiz1/cmp_luasnip" },
|
||||
},
|
||||
|
||||
{
|
||||
"jay-babu/mason-null-ls.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
},
|
||||
},
|
||||
|
||||
-- "gc" to comment visual regions/lines
|
||||
{ "numToStr/Comment.nvim", opts = {} },
|
||||
|
||||
{
|
||||
"famiu/bufdelete.nvim",
|
||||
config = nil,
|
||||
keys = {
|
||||
{
|
||||
"<leader>c",
|
||||
function()
|
||||
require("bufdelete").bufdelete(0, true)
|
||||
end,
|
||||
desc = "Close buffer",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
14
config/nvim/lua/aleidk/plugins/lsp_signature.lua
Normal file
14
config/nvim/lua/aleidk/plugins/lsp_signature.lua
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
return {
|
||||
"ray-x/lsp_signature.nvim",
|
||||
lazy = false, -- Doesn't work if lazy loaded
|
||||
opts = {
|
||||
hint_enable = false,
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>lk",
|
||||
vim.lsp.buf.signature_help,
|
||||
desc = "Toggle signature",
|
||||
},
|
||||
},
|
||||
}
|
||||
13
config/nvim/lua/aleidk/plugins/lualine.lua
Normal file
13
config/nvim/lua/aleidk/plugins/lualine.lua
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
return {
|
||||
-- Set lualine as statusline
|
||||
"nvim-lualine/lualine.nvim",
|
||||
-- See `:help lualine.txt`
|
||||
opts = {
|
||||
options = {
|
||||
icons_enabled = false,
|
||||
theme = "onedark",
|
||||
component_separators = "|",
|
||||
section_separators = "",
|
||||
},
|
||||
},
|
||||
}
|
||||
13
config/nvim/lua/aleidk/plugins/nvim-spider.lua
Normal file
13
config/nvim/lua/aleidk/plugins/nvim-spider.lua
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
return {
|
||||
"chrisgrieser/nvim-spider",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("spider").setup({
|
||||
skipInsignificantPunctuation = false,
|
||||
})
|
||||
vim.keymap.set({ "n", "o", "x" }, "w", "<cmd>lua require('spider').motion('w')<CR>", { desc = "Spider-w" })
|
||||
vim.keymap.set({ "n", "o", "x" }, "e", "<cmd>lua require('spider').motion('e')<CR>", { desc = "Spider-e" })
|
||||
vim.keymap.set({ "n", "o", "x" }, "b", "<cmd>lua require('spider').motion('b')<CR>", { desc = "Spider-b" })
|
||||
vim.keymap.set({ "n", "o", "x" }, "ge", "<cmd>lua require('spider').motion('ge')<CR>", { desc = "Spider-ge" })
|
||||
end,
|
||||
}
|
||||
87
config/nvim/lua/aleidk/plugins/nvim-tree.lua
Normal file
87
config/nvim/lua/aleidk/plugins/nvim-tree.lua
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
return {
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
-- enabled = false,
|
||||
version = "*",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
lazy = false,
|
||||
config = function()
|
||||
local tree = require("nvim-tree")
|
||||
local api = require("nvim-tree.api")
|
||||
|
||||
tree.setup({
|
||||
hijack_unnamed_buffer_when_opening = true,
|
||||
disable_netrw = true,
|
||||
hijack_netrw = true,
|
||||
hijack_cursor = true, -- cursor at the start of filename
|
||||
sync_root_with_cwd = true,
|
||||
respect_buf_cwd = true,
|
||||
update_focused_file = {
|
||||
enable = true, -- focus curren file
|
||||
update_root = true,
|
||||
},
|
||||
actions = { open_file = { quit_on_open = true } },
|
||||
renderer = {
|
||||
full_name = true, -- show remaining name in floating text
|
||||
group_empty = true, -- group empty folders
|
||||
add_trailing = true, -- Trailing slash to folders
|
||||
highlight_opened_files = "all",
|
||||
highlight_git = true,
|
||||
},
|
||||
view = {
|
||||
centralize_selection = true, -- center current file on enter
|
||||
width = 30, -- N° of columns or %
|
||||
},
|
||||
on_attach = function(bufnr)
|
||||
local function opts(desc)
|
||||
return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
|
||||
end
|
||||
|
||||
-- Check defaults here: https://github.com/nvim-tree/nvim-tree.lua/wiki/Migrating-To-on_attach
|
||||
api.config.mappings.default_on_attach(bufnr)
|
||||
|
||||
vim.keymap.set("n", "l", api.node.open.edit, opts("Open"))
|
||||
vim.keymap.set("n", "o", api.node.open.edit, opts("Open"))
|
||||
vim.keymap.set("n", "<CR>", api.node.open.edit, opts("Open"))
|
||||
vim.keymap.set("n", "<2-LeftMouse>", api.node.open.edit, opts("Open"))
|
||||
vim.keymap.set("n", "s", api.node.open.vertical, opts("Open in vsplit"))
|
||||
vim.keymap.set("n", "v", api.node.open.horizontal, opts("Open in hsplit"))
|
||||
vim.keymap.set("n", "t", api.node.open.tab, opts("Open in tab"))
|
||||
vim.keymap.set("n", "h", api.node.navigate.parent_close, opts("Close dir"))
|
||||
vim.keymap.set("n", "<BS>", api.node.navigate.parent_close, opts("Close dir"))
|
||||
vim.keymap.set("n", "i", api.tree.toggle_hidden_filter, opts("Toggle Dotfiles"))
|
||||
vim.keymap.set("n", "I", api.tree.toggle_gitignore_filter, opts("Toggle Git Ignore"))
|
||||
end,
|
||||
})
|
||||
|
||||
-- Auto open when a dir is opened
|
||||
|
||||
local function open_nvim_tree(data)
|
||||
-- buffer is a directory
|
||||
local directory = vim.fn.isdirectory(data.file) == 1
|
||||
|
||||
if not directory then
|
||||
return
|
||||
end
|
||||
|
||||
-- create a new, empty buffer
|
||||
vim.cmd.enew()
|
||||
|
||||
-- wipe the directory buffer
|
||||
vim.cmd.bw(data.buf)
|
||||
|
||||
-- change to the directory
|
||||
vim.cmd.cd(data.file)
|
||||
|
||||
-- open the tree
|
||||
require("nvim-tree.api").tree.open()
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })
|
||||
|
||||
-- bindings
|
||||
vim.keymap.set("n", "<leader>e", ":NvimTreeToggle<CR>", { desc = "Toggle file tree", silent = true })
|
||||
vim.keymap.set("n", "<C-e>", ":NvimTreeToggle<CR>", { desc = "Toggle file tree", silent = true })
|
||||
end,
|
||||
}
|
||||
42
config/nvim/lua/aleidk/plugins/pretty-fold.lua
Normal file
42
config/nvim/lua/aleidk/plugins/pretty-fold.lua
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
return {
|
||||
"anuvyklack/pretty-fold.nvim",
|
||||
config = {
|
||||
sections = {
|
||||
left = {
|
||||
"+",
|
||||
function()
|
||||
return string.rep("-", vim.v.foldlevel)
|
||||
end,
|
||||
" ",
|
||||
"content",
|
||||
" ",
|
||||
"number_of_folded_lines",
|
||||
" ",
|
||||
function()
|
||||
return string.rep("-", vim.v.foldlevel)
|
||||
end,
|
||||
"+",
|
||||
},
|
||||
},
|
||||
fill_char = " ",
|
||||
|
||||
-- Possible values:
|
||||
-- "delete" : Delete all comment signs from the fold string.
|
||||
-- "spaces" : Replace all comment signs with equal number of spaces.
|
||||
-- false : Do nothing with comment signs.
|
||||
process_comment_signs = "delete",
|
||||
|
||||
-- List of patterns that will be removed from content foldtext section.
|
||||
stop_words = {
|
||||
"@brief%s*", -- (for C++) Remove '@brief' and all spaces after.
|
||||
},
|
||||
|
||||
matchup_patterns = {
|
||||
{ "{", "}" },
|
||||
{ "%(", ")" }, -- % to escape lua pattern char
|
||||
{ "%[", "]" }, -- % to escape lua pattern char
|
||||
},
|
||||
|
||||
ft_ignore = { "neorg" },
|
||||
},
|
||||
}
|
||||
66
config/nvim/lua/aleidk/plugins/telescope.lua
Normal file
66
config/nvim/lua/aleidk/plugins/telescope.lua
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
-- Fuzzy Finder (files, lsp, etc)
|
||||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
version = "*",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
{
|
||||
-- Blazingly Fast Fuzzy Finder Algorithm for Telescope
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build = "make",
|
||||
cond = function()
|
||||
return vim.fn.executable("make") == 1
|
||||
end,
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local actions = require("telescope.actions")
|
||||
local telescope = require("telescope")
|
||||
local builtin = require("telescope.builtin")
|
||||
|
||||
local opts = {
|
||||
defaults = {
|
||||
prompt_prefix = " ",
|
||||
selection_caret = " ",
|
||||
mappings = {
|
||||
i = {
|
||||
["<c-u>"] = false,
|
||||
["<c-d>"] = false,
|
||||
["<C-j>"] = actions.move_selection_next,
|
||||
["<C-k>"] = actions.move_selection_previous,
|
||||
["<C-s>"] = actions.file_vsplit,
|
||||
["<C-v>"] = actions.file_split,
|
||||
["<ESC>"] = actions.close,
|
||||
["<c-t>"] = function(...)
|
||||
return require("trouble.providers.telescope").open_with_trouble(...)
|
||||
end,
|
||||
["<a-t>"] = function(...)
|
||||
return require("trouble.providers.telescope").open_selected_with_trouble(...)
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
telescope.setup(opts)
|
||||
|
||||
-- Enable telescope fzf native, if installed
|
||||
pcall(telescope.load_extension, "fzf")
|
||||
|
||||
-- Find files
|
||||
vim.keymap.set("n", "<leader>fb", builtin.buffers, { desc = "[F]ind existing [B]uffers" })
|
||||
vim.keymap.set("n", "<leader>ff", builtin.find_files, { desc = "[F]ind [F]iles" })
|
||||
|
||||
-- Search stuff
|
||||
vim.keymap.set("n", "<leader>sh", builtin.help_tags, { desc = "[S]earch [H]elp" })
|
||||
vim.keymap.set("n", "<leader>sk", builtin.keymaps, { desc = "[S]earch [K]eymaps" })
|
||||
vim.keymap.set("n", "<leader>sw", builtin.grep_string, { desc = "[S]earch current [W]ord" })
|
||||
vim.keymap.set("n", "<leader>sg", builtin.live_grep, { desc = "[S]earch by [G]rep" })
|
||||
vim.keymap.set("n", "<leader>sD", function()
|
||||
builtin.commands({ bufnr = 0 })
|
||||
end, { desc = "[S]earch Workspace [D]iagnostics" })
|
||||
vim.keymap.set("n", "<leader>sd", builtin.diagnostics, { desc = "[S]earch Document [D]iagnostics" })
|
||||
vim.keymap.set("n", "<leader>sc", builtin.command_history, { desc = "[S]earch [C]ommand History" })
|
||||
vim.keymap.set("n", "<leader>sC", builtin.commands, { desc = "[S]earch [C]ommands" })
|
||||
end,
|
||||
}
|
||||
81
config/nvim/lua/aleidk/plugins/treesitter.lua
Normal file
81
config/nvim/lua/aleidk/plugins/treesitter.lua
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
return {
|
||||
-- Highlight, edit, and navigate code
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
"windwp/nvim-ts-autotag",
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
},
|
||||
build = ":TSUpdate",
|
||||
opts = {
|
||||
-- Add languages to be installed here that you want installed for treesitter
|
||||
ensure_installed = { "c", "cpp", "go", "lua", "python", "rust", "tsx", "typescript", "vimdoc", "vim" },
|
||||
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
||||
auto_install = true,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<c-space>",
|
||||
node_incremental = "<c-space>",
|
||||
scope_incremental = "<c-s>",
|
||||
node_decremental = "<M-space>",
|
||||
},
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
|
||||
keymaps = {
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
["aa"] = "@parameter.outer",
|
||||
["ia"] = "@parameter.inner",
|
||||
["af"] = "@function.outer",
|
||||
["if"] = "@function.inner",
|
||||
["ac"] = "@class.outer",
|
||||
["ic"] = "@class.inner",
|
||||
},
|
||||
},
|
||||
move = {
|
||||
enable = true,
|
||||
set_jumps = true, -- whether to set jumps in the jumplist
|
||||
goto_next_start = {
|
||||
["]m"] = "@function.outer",
|
||||
["]]"] = "@class.outer",
|
||||
},
|
||||
goto_next_end = {
|
||||
["]M"] = "@function.outer",
|
||||
["]["] = "@class.outer",
|
||||
},
|
||||
goto_previous_start = {
|
||||
["[m"] = "@function.outer",
|
||||
["[["] = "@class.outer",
|
||||
},
|
||||
goto_previous_end = {
|
||||
["[M"] = "@function.outer",
|
||||
["[]"] = "@class.outer",
|
||||
},
|
||||
},
|
||||
swap = {
|
||||
enable = true,
|
||||
swap_next = {
|
||||
["<leader>a"] = "@parameter.inner",
|
||||
},
|
||||
swap_previous = {
|
||||
["<leader>A"] = "@parameter.inner",
|
||||
},
|
||||
},
|
||||
},
|
||||
autotag = { enable = true },
|
||||
context_commentstring = { enable = true, enable_autocmd = false },
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
vim.cmd([[
|
||||
set foldmethod=expr
|
||||
set foldexpr=nvim_treesitter#foldexpr()
|
||||
set nofoldenable
|
||||
]])
|
||||
end,
|
||||
}
|
||||
32
config/nvim/lua/aleidk/plugins/trouble.lua
Normal file
32
config/nvim/lua/aleidk/plugins/trouble.lua
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
return {
|
||||
"folke/trouble.nvim",
|
||||
-- dependencies = { "kyazdani42/nvim-web-devicons" },
|
||||
config = function()
|
||||
require("trouble").setup({
|
||||
mode = "document_diagnostics",
|
||||
action_keys = { -- key mappings for actions in the trouble list
|
||||
-- map to {} to remove a mapping, for example:
|
||||
-- close = {},
|
||||
close = "q", -- close the list
|
||||
cancel = "<esc>", -- cancel the preview and get back to your last window / buffer / cursor
|
||||
refresh = "r", -- manually refresh
|
||||
jump = { "<cr>", "<tab>" }, -- jump to the diagnostic or open / close folds
|
||||
open_split = { "s" }, -- open buffer in new split
|
||||
open_vsplit = { "v" }, -- open buffer in new vsplit
|
||||
open_tab = { "t" }, -- open buffer in new tab
|
||||
jump_close = { "o" }, -- jump to the diagnostic and close the list
|
||||
toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode
|
||||
toggle_preview = "P", -- toggle auto_preview
|
||||
hover = "K", -- opens a small popup with the full multiline message
|
||||
preview = "p", -- preview the diagnostic location
|
||||
close_folds = { "zM", "zm" }, -- close all folds
|
||||
open_folds = { "zR", "zr" }, -- open all folds
|
||||
toggle_fold = { "zA", "za" }, -- toggle fold of current file
|
||||
previous = "k", -- previous item
|
||||
next = "j", -- next item
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>fd", "<cmd>TroubleToggle<cr>", { silent = true, desc = "Search diagnostics" })
|
||||
end,
|
||||
}
|
||||
18
config/nvim/lua/aleidk/plugins/ts-node-action.lua
Normal file
18
config/nvim/lua/aleidk/plugins/ts-node-action.lua
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
return {
|
||||
"ckolkey/ts-node-action",
|
||||
dependencies = { "nvim-treesitter", "jose-elias-alvarez/null-ls.nvim" },
|
||||
config = function()
|
||||
require("ts-node-action").setup({})
|
||||
|
||||
vim.keymap.set({ "n" }, "<leader>lA", require("ts-node-action").node_action, { desc = "Trigger Node Action" })
|
||||
|
||||
require("null-ls").register({
|
||||
name = "more_actions",
|
||||
method = { require("null-ls").methods.CODE_ACTION },
|
||||
filetypes = { "_all" },
|
||||
generator = {
|
||||
fn = require("ts-node-action").available_actions,
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
26
config/nvim/lua/aleidk/plugins/which-key.lua
Normal file
26
config/nvim/lua/aleidk/plugins/which-key.lua
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
return {
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
plugins = { spelling = true },
|
||||
defaults = {
|
||||
mode = { "n", "v" },
|
||||
["g"] = { name = "+Goto" },
|
||||
["gz"] = { name = "+Surround" },
|
||||
["<leader>b"] = { name = "+Buffer" },
|
||||
["<leader>c"] = { name = "+Comments" },
|
||||
["<leader>f"] = { name = "+File/Find" },
|
||||
["<leader>g"] = { name = "+Git" },
|
||||
["<leader>q"] = { name = "+Quit/Session" },
|
||||
["<leader>s"] = { name = "+Search" },
|
||||
["<leader>u"] = { name = "+UI" },
|
||||
["<leader>w"] = { name = "+Windows" },
|
||||
["<leader>l"] = { name = "+Diagnostics/Quickfix" },
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
local wk = require("which-key")
|
||||
wk.setup(opts)
|
||||
wk.register(opts.defaults)
|
||||
end,
|
||||
}
|
||||
74
config/nvim/lua/kickstart/plugins/autoformat.lua
Normal file
74
config/nvim/lua/kickstart/plugins/autoformat.lua
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
-- autoformat.lua
|
||||
--
|
||||
-- Use your language server to automatically format your code on save.
|
||||
-- Adds additional commands as well to manage the behavior
|
||||
|
||||
return {
|
||||
'neovim/nvim-lspconfig',
|
||||
config = function()
|
||||
-- Switch for controlling whether you want autoformatting.
|
||||
-- Use :KickstartFormatToggle to toggle autoformatting on or off
|
||||
local format_is_enabled = true
|
||||
vim.api.nvim_create_user_command('KickstartFormatToggle', function()
|
||||
format_is_enabled = not format_is_enabled
|
||||
print('Setting autoformatting to: ' .. tostring(format_is_enabled))
|
||||
end, {})
|
||||
|
||||
-- Create an augroup that is used for managing our formatting autocmds.
|
||||
-- We need one augroup per client to make sure that multiple clients
|
||||
-- can attach to the same buffer without interfering with each other.
|
||||
local _augroups = {}
|
||||
local get_augroup = function(client)
|
||||
if not _augroups[client.id] then
|
||||
local group_name = 'kickstart-lsp-format-' .. client.name
|
||||
local id = vim.api.nvim_create_augroup(group_name, { clear = true })
|
||||
_augroups[client.id] = id
|
||||
end
|
||||
|
||||
return _augroups[client.id]
|
||||
end
|
||||
|
||||
-- Whenever an LSP attaches to a buffer, we will run this function.
|
||||
--
|
||||
-- See `:help LspAttach` for more information about this autocmd event.
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
group = vim.api.nvim_create_augroup('kickstart-lsp-attach-format', { clear = true }),
|
||||
-- This is where we attach the autoformatting for reasonable clients
|
||||
callback = function(args)
|
||||
local client_id = args.data.client_id
|
||||
local client = vim.lsp.get_client_by_id(client_id)
|
||||
local bufnr = args.buf
|
||||
|
||||
-- Only attach to clients that support document formatting
|
||||
if not client.server_capabilities.documentFormattingProvider then
|
||||
return
|
||||
end
|
||||
|
||||
-- Tsserver usually works poorly. Sorry you work with bad languages
|
||||
-- You can remove this line if you know what you're doing :)
|
||||
if client.name == 'tsserver' then
|
||||
return
|
||||
end
|
||||
|
||||
-- Create an autocmd that will run *before* we save the buffer.
|
||||
-- Run the formatting command for the LSP that has just attached.
|
||||
vim.api.nvim_create_autocmd('BufWritePre', {
|
||||
group = get_augroup(client),
|
||||
buffer = bufnr,
|
||||
callback = function()
|
||||
if not format_is_enabled then
|
||||
return
|
||||
end
|
||||
|
||||
vim.lsp.buf.format {
|
||||
async = false,
|
||||
filter = function(c)
|
||||
return c.id == client.id
|
||||
end,
|
||||
}
|
||||
end,
|
||||
})
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
83
config/nvim/lua/kickstart/plugins/debug.lua
Normal file
83
config/nvim/lua/kickstart/plugins/debug.lua
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
-- debug.lua
|
||||
--
|
||||
-- Shows how to use the DAP plugin to debug your code.
|
||||
--
|
||||
-- Primarily focused on configuring the debugger for Go, but can
|
||||
-- be extended to other languages as well. That's why it's called
|
||||
-- kickstart.nvim and not kitchen-sink.nvim ;)
|
||||
|
||||
return {
|
||||
-- NOTE: Yes, you can install new plugins here!
|
||||
'mfussenegger/nvim-dap',
|
||||
-- NOTE: And you can specify dependencies as well
|
||||
dependencies = {
|
||||
-- Creates a beautiful debugger UI
|
||||
'rcarriga/nvim-dap-ui',
|
||||
|
||||
-- Installs the debug adapters for you
|
||||
'williamboman/mason.nvim',
|
||||
'jay-babu/mason-nvim-dap.nvim',
|
||||
|
||||
-- Add your own debuggers here
|
||||
'leoluz/nvim-dap-go',
|
||||
},
|
||||
config = function()
|
||||
local dap = require 'dap'
|
||||
local dapui = require 'dapui'
|
||||
|
||||
require('mason-nvim-dap').setup {
|
||||
-- Makes a best effort to setup the various debuggers with
|
||||
-- reasonable debug configurations
|
||||
automatic_setup = true,
|
||||
|
||||
-- You can provide additional configuration to the handlers,
|
||||
-- see mason-nvim-dap README for more information
|
||||
handlers = {},
|
||||
|
||||
-- You'll need to check that you have the required things installed
|
||||
-- online, please don't ask me how to install them :)
|
||||
ensure_installed = {
|
||||
-- Update this to ensure that you have the debuggers for the langs you want
|
||||
'delve',
|
||||
},
|
||||
}
|
||||
|
||||
-- Basic debugging keymaps, feel free to change to your liking!
|
||||
vim.keymap.set('n', '<F5>', dap.continue)
|
||||
vim.keymap.set('n', '<F1>', dap.step_into)
|
||||
vim.keymap.set('n', '<F2>', dap.step_over)
|
||||
vim.keymap.set('n', '<F3>', dap.step_out)
|
||||
vim.keymap.set('n', '<leader>b', dap.toggle_breakpoint)
|
||||
vim.keymap.set('n', '<leader>B', function()
|
||||
dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
|
||||
end)
|
||||
|
||||
-- Dap UI setup
|
||||
-- For more information, see |:help nvim-dap-ui|
|
||||
dapui.setup {
|
||||
-- Set icons to characters that are more likely to work in every terminal.
|
||||
-- Feel free to remove or use ones that you like more! :)
|
||||
-- Don't feel like these are good choices.
|
||||
icons = { expanded = '▾', collapsed = '▸', current_frame = '*' },
|
||||
controls = {
|
||||
icons = {
|
||||
pause = '⏸',
|
||||
play = '▶',
|
||||
step_into = '⏎',
|
||||
step_over = '⏭',
|
||||
step_out = '⏮',
|
||||
step_back = 'b',
|
||||
run_last = '▶▶',
|
||||
terminate = '⏹',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
|
||||
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
||||
dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
||||
|
||||
-- Install golang specific config
|
||||
require('dap-go').setup()
|
||||
end,
|
||||
}
|
||||
226
config/sway/config
Normal file
226
config/sway/config
Normal file
|
|
@ -0,0 +1,226 @@
|
|||
# Default config for sway
|
||||
#
|
||||
# Copy this to ~/.config/sway/config and edit it to your liking.
|
||||
#
|
||||
# Read `man 5 sway` for a complete reference.
|
||||
|
||||
### Variables
|
||||
#
|
||||
# Logo key. Use Mod1 for Alt.
|
||||
set $mod Mod4
|
||||
|
||||
# Home row direction keys, like vim
|
||||
set $left h
|
||||
set $down j
|
||||
set $up k
|
||||
set $right l
|
||||
|
||||
# Your preferred terminal emulator
|
||||
set $term alacritty
|
||||
|
||||
# Your preferred application launcher
|
||||
# Note: pass the final command to swaymsg so that the resulting window can be opened
|
||||
# on the original workspace that the command was run on.
|
||||
set $menu dmenu_path | dmenu | xargs swaymsg exec --
|
||||
|
||||
### Output configuration
|
||||
#
|
||||
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
|
||||
output * bg ~/Pictures/wallpaper.jpg fill
|
||||
#
|
||||
# Example configuration:
|
||||
#
|
||||
# output HDMI-A-1 resolution 1920x1080 position 1920,0
|
||||
#
|
||||
# You can get the names of your outputs by running: swaymsg -t get_outputs
|
||||
|
||||
### Idle configuration
|
||||
#
|
||||
# Example configuration:
|
||||
#
|
||||
# exec swayidle -w \
|
||||
# timeout 300 'swaylock -f -c 000000' \
|
||||
# timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
|
||||
# before-sleep 'swaylock -f -c 000000'
|
||||
#
|
||||
# This will lock your screen after 300 seconds of inactivity, then turn off
|
||||
# your displays after another 300 seconds, and turn your screens back on when
|
||||
# resumed. It will also lock your screen before your computer goes to sleep.
|
||||
|
||||
### Input configuration
|
||||
#
|
||||
# Example configuration:
|
||||
#
|
||||
input "2:14:ETPS/2_Elantech_Touchpad" {
|
||||
dwt enabled
|
||||
tap enabled
|
||||
natural_scroll enabled
|
||||
middle_emulation enabled
|
||||
}
|
||||
|
||||
input "type:keyboard" {
|
||||
xkb_layout latam
|
||||
xkb_options caps:escape
|
||||
}
|
||||
#
|
||||
# You can get the names of your inputs by running: swaymsg -t get_inputs
|
||||
# Read `man 5 sway-input` for more information about this section.
|
||||
|
||||
### Key bindings
|
||||
#
|
||||
# Basics:
|
||||
#
|
||||
# Start a terminal
|
||||
bindsym $mod+Return exec $term
|
||||
|
||||
# Kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# Start your launcher
|
||||
bindsym $mod+d exec $menu
|
||||
|
||||
# Drag floating windows by holding down $mod and left mouse button.
|
||||
# Resize them with right mouse button + $mod.
|
||||
# Despite the name, also works for non-floating windows.
|
||||
# Change normal to inverse to use left mouse button for resizing and right
|
||||
# mouse button for dragging.
|
||||
floating_modifier $mod normal
|
||||
|
||||
# Reload the configuration file
|
||||
bindsym $mod+Shift+c reload
|
||||
|
||||
# Exit sway (logs you out of your Wayland session)
|
||||
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
|
||||
bindsym $mod+Shift+r reload
|
||||
#
|
||||
# Moving around:
|
||||
#
|
||||
# Move your focus around
|
||||
bindsym $mod+$left focus left
|
||||
bindsym $mod+$down focus down
|
||||
bindsym $mod+$up focus up
|
||||
bindsym $mod+$right focus right
|
||||
# Or use $mod+[up|down|left|right]
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# Move the focused window with the same, but add Shift
|
||||
bindsym $mod+Shift+$left move left
|
||||
bindsym $mod+Shift+$down move down
|
||||
bindsym $mod+Shift+$up move up
|
||||
bindsym $mod+Shift+$right move right
|
||||
# Ditto, with arrow keys
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
#
|
||||
# Workspaces:
|
||||
#
|
||||
# Switch to workspace
|
||||
bindsym $mod+1 workspace number 1
|
||||
bindsym $mod+2 workspace number 2
|
||||
bindsym $mod+3 workspace number 3
|
||||
bindsym $mod+4 workspace number 4
|
||||
bindsym $mod+5 workspace number 5
|
||||
bindsym $mod+6 workspace number 6
|
||||
bindsym $mod+7 workspace number 7
|
||||
bindsym $mod+8 workspace number 8
|
||||
bindsym $mod+9 workspace number 9
|
||||
bindsym $mod+0 workspace number 10
|
||||
# Move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace number 1
|
||||
bindsym $mod+Shift+2 move container to workspace number 2
|
||||
bindsym $mod+Shift+3 move container to workspace number 3
|
||||
bindsym $mod+Shift+4 move container to workspace number 4
|
||||
bindsym $mod+Shift+5 move container to workspace number 5
|
||||
bindsym $mod+Shift+6 move container to workspace number 6
|
||||
bindsym $mod+Shift+7 move container to workspace number 7
|
||||
bindsym $mod+Shift+8 move container to workspace number 8
|
||||
bindsym $mod+Shift+9 move container to workspace number 9
|
||||
bindsym $mod+Shift+0 move container to workspace number 10
|
||||
# Note: workspaces can have any name you want, not just numbers.
|
||||
# We just use 1-10 as the default.
|
||||
#
|
||||
# Layout stuff:
|
||||
#
|
||||
# You can "split" the current object of your focus with
|
||||
# $mod+b or $mod+v, for horizontal and vertical splits
|
||||
# respectively.
|
||||
bindsym $mod+b splith
|
||||
bindsym $mod+v splitv
|
||||
|
||||
# Switch the current container between different layout styles
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# Make the current focus fullscreen
|
||||
bindsym $mod+f fullscreen
|
||||
|
||||
# Toggle the current focus between tiling and floating mode
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# Swap focus between the tiling area and the floating area
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# Move focus to the parent container
|
||||
bindsym $mod+a focus parent
|
||||
#
|
||||
# Scratchpad:
|
||||
#
|
||||
# Sway has a "scratchpad", which is a bag of holding for windows.
|
||||
# You can send windows there and get them back later.
|
||||
|
||||
# Move the currently focused window to the scratchpad
|
||||
bindsym $mod+Shift+minus move scratchpad
|
||||
|
||||
# Show the next scratchpad window or hide the focused scratchpad window.
|
||||
# If there are multiple scratchpad windows, this command cycles through them.
|
||||
bindsym $mod+minus scratchpad show
|
||||
#
|
||||
# Resizing containers:
|
||||
#
|
||||
mode "resize" {
|
||||
# left will shrink the containers width
|
||||
# right will grow the containers width
|
||||
# up will shrink the containers height
|
||||
# down will grow the containers height
|
||||
bindsym $left resize shrink width 10px
|
||||
bindsym $down resize grow height 10px
|
||||
bindsym $up resize shrink height 10px
|
||||
bindsym $right resize grow width 10px
|
||||
|
||||
# Ditto, with arrow keys
|
||||
bindsym Left resize shrink width 10px
|
||||
bindsym Down resize grow height 10px
|
||||
bindsym Up resize shrink height 10px
|
||||
bindsym Right resize grow width 10px
|
||||
|
||||
# Return to default mode
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
#
|
||||
# Status Bar:
|
||||
#
|
||||
# Read `man 5 sway-bar` for more information about this section.
|
||||
bar {
|
||||
position top
|
||||
|
||||
# When the status_command prints a new line to stdout, swaybar updates.
|
||||
# The default just shows the current date and time.
|
||||
status_command while ~/.config/sway/sway-bar.sh; do sleep 1; done
|
||||
|
||||
colors {
|
||||
statusline #ffffff
|
||||
background #323232
|
||||
inactive_workspace #32323200 #32323200 #5c5c5c
|
||||
}
|
||||
}
|
||||
|
||||
include /etc/sway/config.d/*
|
||||
13
config/sway/sway-bar.sh
Executable file
13
config/sway/sway-bar.sh
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Date
|
||||
date=$(date "+%a %F %R")
|
||||
|
||||
# Battery
|
||||
battery=$(cat /sys/class/power_supply/BAT*/capacity)
|
||||
|
||||
# Alsa master volume
|
||||
volume=$(amixer get Master | grep "Right:" | cut -f 7,8 -d " ")
|
||||
|
||||
# Status bar
|
||||
echo "Vol: $volume | Bat: ${battery}% | $date"
|
||||
|
|
@ -26,3 +26,26 @@ alias obsidian='flatpak run md.obsidian.Obsidian'
|
|||
alias spot='flatpak run dev.alextren.Spot'
|
||||
alias insomnia='flatpak run rest.insomnia.Insomnia'
|
||||
alias sequeler='flatpak run com.github.alecaddd.sequeler'
|
||||
|
||||
# Auto-generated aliases for Flatpak applications
|
||||
|
||||
alias epiphany='flatpak run org.gnome.Epiphany'
|
||||
alias font-viewer='flatpak run org.gnome.font-viewer'
|
||||
alias eog='flatpak run org.gnome.eog'
|
||||
alias clocks='flatpak run org.gnome.clocks'
|
||||
alias baobab='flatpak run org.gnome.baobab'
|
||||
alias weather='flatpak run org.gnome.Weather'
|
||||
alias texteditor='flatpak run org.gnome.TextEditor'
|
||||
alias nautiluspreviewer='flatpak run org.gnome.NautilusPreviewer'
|
||||
alias maps='flatpak run org.gnome.Maps'
|
||||
alias logs='flatpak run org.gnome.Logs'
|
||||
alias extensions='flatpak run org.gnome.Extensions'
|
||||
alias evince='flatpak run org.gnome.Evince'
|
||||
alias contacts='flatpak run org.gnome.Contacts'
|
||||
alias connections='flatpak run org.gnome.Connections'
|
||||
alias characters='flatpak run org.gnome.Characters'
|
||||
alias calendar='flatpak run org.gnome.Calendar'
|
||||
alias calculator='flatpak run org.gnome.Calculator'
|
||||
alias mediawriter='flatpak run org.fedoraproject.MediaWriter'
|
||||
alias pods='flatpak run com.github.marhkb.Pods'
|
||||
alias podmandesktop='flatpak run io.podman_desktop.PodmanDesktop'
|
||||
|
|
|
|||
24
config/zsh/aliases/nvim.zsh
Normal file
24
config/zsh/aliases/nvim.zsh
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
alias \
|
||||
vi='nvim' \
|
||||
vi-astro='NVIM_APPNAME=AstroNvim nvim' \
|
||||
vi-lazy='NVIM_APPNAME=LazyVim nvim'
|
||||
|
||||
vis() {
|
||||
items=(
|
||||
default
|
||||
AstroNvim
|
||||
LazyVim
|
||||
)
|
||||
config=$(printf "%s\n" "${items[@]}" | fzf --prompt=" Neovim Config " --height=~50% --layout=reverse --border --exit-0)
|
||||
|
||||
if [[ -z $config ]]; then
|
||||
echo "Nothing selected"
|
||||
return 0
|
||||
elif [[ $config == "default" ]]; then
|
||||
config=""
|
||||
fi
|
||||
|
||||
NVIM_APPNAME=$config nvim $@
|
||||
}
|
||||
|
||||
bindkey -s ^a "vis\n"
|
||||
2
config/zsh/aliases/silverblue.zsh
Normal file
2
config/zsh/aliases/silverblue.zsh
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
alias \
|
||||
sb-list='ostree remote refs fedora | grep "[0-9]\{2\}\/x86_64\/[a-z]\+$"'
|
||||
23
config/zsh/functions/fedora.zsh
Normal file
23
config/zsh/functions/fedora.zsh
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
dnf-save-install() {
|
||||
file="$DOTS/exports/dnf.txt"
|
||||
echo "$*" >> "$file"
|
||||
sort -u -o "$file" "$file"
|
||||
sudo dnf install -y $(cat "$DOTS/exports/dnf.txt")
|
||||
}
|
||||
|
||||
upgrade() {
|
||||
sudo dnf upgrade --refresh -y
|
||||
}
|
||||
|
||||
mayor-upgrade() {
|
||||
if [[ $(dnf check-update -q) ]]; then
|
||||
echo "There are updates pending, update and reboot? [y/N]"
|
||||
read -r answer
|
||||
|
||||
if [[ $answer == 'y' || $answer == 'Y' ]]; then
|
||||
upgrade
|
||||
sc-reboot
|
||||
|
||||
fi
|
||||
fi
|
||||
}
|
||||
1
exports/copr.txt
Normal file
1
exports/copr.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
atim/lazygit
|
||||
17
exports/dnf.txt
Normal file
17
exports/dnf.txt
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
dnf-plugin-system-upgrade
|
||||
exa
|
||||
fd-find
|
||||
flatpak
|
||||
fzf
|
||||
gcc
|
||||
gcc-c++
|
||||
git
|
||||
gnome-software
|
||||
neovim
|
||||
nodejs
|
||||
remove-retired-packages
|
||||
ripgrep
|
||||
tealdeer
|
||||
tmux
|
||||
tree-sitter-cli
|
||||
zsh
|
||||
|
|
@ -3,7 +3,8 @@
|
|||
echo -e "\n${BLD}${SUL}${GRN}Setting up ${RED}Rust${GRN}...${RST}\n"
|
||||
|
||||
if ! command -v cargo >/dev/null; then
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
fi
|
||||
|
||||
cargo install tree-sitter-cli
|
||||
# installed through package-manager
|
||||
# cargo install tree-sitter-cli
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue