remove neovim
Signed-off-by: Michael Thomson <michael@michaelthomson.dev>
This commit is contained in:
parent
116e757499
commit
f3e9f9e031
@ -19,7 +19,11 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ self, nixpkgs, home-manager, nix-darwin, nixos-hardware, nixvim, ... }: {
|
outputs = inputs @ {
|
||||||
|
nixpkgs,
|
||||||
|
nix-darwin,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
desktop = nixpkgs.lib.nixosSystem {
|
desktop = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
@ -30,7 +30,6 @@
|
|||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
neovim
|
|
||||||
wget
|
wget
|
||||||
git
|
git
|
||||||
curl
|
curl
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
../../modules/home-manager/i3
|
../../modules/home-manager/i3
|
||||||
../../modules/home-manager/ssh
|
../../modules/home-manager/ssh
|
||||||
../../modules/home-manager/git
|
../../modules/home-manager/git
|
||||||
../../modules/home-manager/neovim
|
../../modules/home-manager/nixvim
|
||||||
../../modules/home-manager/wezterm
|
../../modules/home-manager/wezterm
|
||||||
../../modules/home-manager/zsh
|
../../modules/home-manager/zsh
|
||||||
../../modules/home-manager/tmux
|
../../modules/home-manager/tmux
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
neovim
|
|
||||||
wget
|
wget
|
||||||
git
|
git
|
||||||
curl
|
curl
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
../../modules/home-manager/i3
|
../../modules/home-manager/i3
|
||||||
../../modules/home-manager/ssh
|
../../modules/home-manager/ssh
|
||||||
../../modules/home-manager/git
|
../../modules/home-manager/git
|
||||||
../../modules/home-manager/neovim
|
../../modules/home-manager/nixvim
|
||||||
../../modules/home-manager/wezterm
|
../../modules/home-manager/wezterm
|
||||||
../../modules/home-manager/zsh
|
../../modules/home-manager/zsh
|
||||||
../../modules/home-manager/tmux
|
../../modules/home-manager/tmux
|
||||||
|
@ -54,8 +54,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# programs.zsh.enable = true;
|
|
||||||
|
|
||||||
system.stateVersion = 5;
|
system.stateVersion = 5;
|
||||||
|
|
||||||
# Auto upgrade nix package and the daemon service.
|
# Auto upgrade nix package and the daemon service.
|
||||||
|
@ -19,17 +19,15 @@
|
|||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
EDITOR = "nvim";
|
EDITOR = "nvim";
|
||||||
|
ZK_NOTEBOOK_DIR = "\${HOME}/zk";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
direnv = {
|
direnv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableZshIntegration = true; # see note on other shells below
|
enableZshIntegration = true;
|
||||||
nix-direnv.enable = true;
|
nix-direnv.enable = true;
|
||||||
};
|
};
|
||||||
java = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
zk = {
|
zk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
@ -38,10 +36,9 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
go = {
|
||||||
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
home.sessionVariables = {
|
|
||||||
ZK_NOTEBOOK_DIR = "\${HOME}/zk";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
@ -67,7 +64,6 @@
|
|||||||
glow
|
glow
|
||||||
gcc
|
gcc
|
||||||
nchat
|
nchat
|
||||||
go
|
|
||||||
emanote
|
emanote
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -35,7 +35,6 @@
|
|||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
neovim
|
|
||||||
wget
|
wget
|
||||||
git
|
git
|
||||||
curl
|
curl
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
../../modules/home-manager/i3
|
../../modules/home-manager/i3
|
||||||
../../modules/home-manager/ssh
|
../../modules/home-manager/ssh
|
||||||
../../modules/home-manager/git
|
../../modules/home-manager/git
|
||||||
../../modules/home-manager/neovim
|
../../modules/home-manager/nixvim
|
||||||
../../modules/home-manager/wezterm
|
../../modules/home-manager/wezterm
|
||||||
../../modules/home-manager/zsh
|
../../modules/home-manager/zsh
|
||||||
../../modules/home-manager/tmux
|
../../modules/home-manager/tmux
|
||||||
|
@ -149,10 +149,6 @@
|
|||||||
addresses = [ "michael@michaelthomson.dev" ];
|
addresses = [ "michael@michaelthomson.dev" ];
|
||||||
collections = [ "default" ];
|
collections = [ "default" ];
|
||||||
};
|
};
|
||||||
khard = {
|
|
||||||
enable = true;
|
|
||||||
defaultCollection = "default";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
{ inputs, pkgs, config, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
fzf
|
|
||||||
ripgrep
|
|
||||||
luarocks
|
|
||||||
luajit
|
|
||||||
lua-language-server
|
|
||||||
nil
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.neovim = {
|
|
||||||
enable = true;
|
|
||||||
package = inputs.neovim-nightly-overlay.packages.${pkgs.system}.default;
|
|
||||||
};
|
|
||||||
|
|
||||||
home.file.".config/nvim/" = {
|
|
||||||
source = ./nvim;
|
|
||||||
recursive = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,76 +0,0 @@
|
|||||||
# My Neovim Config
|
|
||||||
<a href="https://dotfyle.com/michaelthomson0797/nvim"><img src="https://dotfyle.com/michaelthomson0797/nvim/badges/plugins?style=flat" /></a>
|
|
||||||
<a href="https://dotfyle.com/michaelthomson0797/nvim"><img src="https://dotfyle.com/michaelthomson0797/nvim/badges/leaderkey?style=flat" /></a>
|
|
||||||
<a href="https://dotfyle.com/michaelthomson0797/nvim"><img src="https://dotfyle.com/michaelthomson0797/nvim/badges/plugin-manager?style=flat" /></a>
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<!--toc:start-->
|
|
||||||
- [My Neovim Config](#my-neovim-config)
|
|
||||||
- [Prerequisites](#prerequisites)
|
|
||||||
- [Installation](#installation)
|
|
||||||
- [Plugins used](#plugins-used)
|
|
||||||
- [Basic Keybinds](#basic-keybinds)
|
|
||||||
- [Project Navigation](#project-navigation)
|
|
||||||
- [File Navigation](#file-navigation)
|
|
||||||
- [LSP Commands](#lsp-commands)
|
|
||||||
<!--toc:end-->
|
|
||||||
|
|
||||||
An okay config
|
|
||||||
|
|
||||||
## Prerequisites
|
|
||||||
- `neovim`
|
|
||||||
- `git`
|
|
||||||
- `fzf`
|
|
||||||
- `ripgrep`
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
Clone this folder, or copy all the contents to `~/.config/nvim/`
|
|
||||||
|
|
||||||
## Plugins used
|
|
||||||
- `lazy.nvim`: Package manager that manages installed plugins
|
|
||||||
- `lsp-zero`: Basic configurations for providing language server support like autocompletion, intellisense, diagnostics, etc.
|
|
||||||
- `alpha-nvim`: Splash screen when starting neovim
|
|
||||||
- `fidget.nvim`: LSP status indicator
|
|
||||||
- `gitsigns.nvim`: File change indicators in the buffer gutter
|
|
||||||
- `harpoon`: Project-specific file bookmarking and rapid navigation
|
|
||||||
- `leap.nvim`: Fast file navigation by jumping to characters in the buffer
|
|
||||||
- `lspsaga.nvim`: UI replacement for many LSP function (rename, documentation hover, etc.)
|
|
||||||
- `lualine.nvim`: Status with nice styling
|
|
||||||
- `mini.nvim`: A collection of utilities
|
|
||||||
- `mini.comment`: Apply language sensitive comments
|
|
||||||
- `mini.pairs`: automatically pair parens, quotes, etc.
|
|
||||||
- `mini.surround`: Quickly add, edit, delete surroundings (parens, quotes, etc.)
|
|
||||||
- `mini.splitjoin`: quickly split or join a list
|
|
||||||
- `mini.jump`: enhanced f/F/t/T movement
|
|
||||||
- `neo-tree.nvim`: File tree explorer and editor
|
|
||||||
- `noice.nvim`: Fancy UI replacements
|
|
||||||
- `nvim-ts-autotag`: Automatic pairing of HTML tags in `.html`, `.jsx`, `.tsx`
|
|
||||||
- `telescope.nvim`: Fuzzy file and text finder
|
|
||||||
- `toggleterm.nvim`: Quickly toggle integrated terminal on and off
|
|
||||||
- `nvim-treesitter`: Syntax tree parsing
|
|
||||||
- `trouble.nvim`: Diagnostics listing
|
|
||||||
- `undotree`: Show file undo/redo history as a tree and traverse it
|
|
||||||
|
|
||||||
## Basic Keybinds
|
|
||||||
### Project Navigation
|
|
||||||
- `<leader>fe`: open file explorer
|
|
||||||
- `<leader>ff`: fuzzy find files in project
|
|
||||||
- `<leader>fg`: fuzzy find text in project
|
|
||||||
- `<leader>fg`: fuzzy find text in project
|
|
||||||
|
|
||||||
### File Navigation
|
|
||||||
- `s{c1}{c2}`: searches the active buffer for the two provided characters and provides prompts to press to instantly navigate to that pair
|
|
||||||
|
|
||||||
### LSP Commands
|
|
||||||
- `gd`: Go to definition
|
|
||||||
- `gr`: Go to references
|
|
||||||
- `<leader>rn`: Rename symbol
|
|
||||||
- `<leader>ca`: Code actions
|
|
||||||
- `<leader>ds`: Fuzzy find document symbols
|
|
||||||
- `<leader>ws`: Fuzzy find workspace symbols
|
|
||||||
- `[d`/`]d`: Jump to next/prev diagnostic
|
|
||||||
- `K`: Show symbol documentation
|
|
||||||
- `<leader>o`: show outline
|
|
||||||
|
|
||||||
|
|
@ -1,71 +0,0 @@
|
|||||||
local opt = vim.opt
|
|
||||||
|
|
||||||
-- Bootstrap lazy.nvim
|
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
|
||||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
|
||||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
|
||||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
|
||||||
if vim.v.shell_error ~= 0 then
|
|
||||||
vim.api.nvim_echo({
|
|
||||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
|
||||||
{ out, "WarningMsg" },
|
|
||||||
{ "\nPress any key to exit..." },
|
|
||||||
}, true, {})
|
|
||||||
vim.fn.getchar()
|
|
||||||
os.exit(1)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
vim.opt.rtp:prepend(lazypath)
|
|
||||||
|
|
||||||
vim.api.nvim_set_keymap("", "<Space>", "<Nop>", { noremap = true, silent = true })
|
|
||||||
vim.g.mapleader = " "
|
|
||||||
vim.g.maplocalleader = " "
|
|
||||||
|
|
||||||
-- Setup lazy.nvim
|
|
||||||
require("lazy").setup({
|
|
||||||
spec = {
|
|
||||||
{ import = "plugins" },
|
|
||||||
},
|
|
||||||
install = { colorscheme = { "habamax" } },
|
|
||||||
checker = { enabled = true },
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Load core settings
|
|
||||||
opt.hlsearch = false -- turn off highlight on search
|
|
||||||
opt.relativenumber = true --Make relative number default
|
|
||||||
opt.updatetime = 50 --Decrease update time
|
|
||||||
opt.clipboard = 'unnamedplus' -- Access system clipboard
|
|
||||||
opt.laststatus = 3 -- Global status line
|
|
||||||
opt.swapfile = false
|
|
||||||
vim.opt_local.conceallevel = 2
|
|
||||||
vim.opt.inccommand = 'split'
|
|
||||||
|
|
||||||
vim.opt.conceallevel = 2;
|
|
||||||
|
|
||||||
-- Time in milliseconds to wait for a mapped sequence to complete.
|
|
||||||
opt.timeoutlen = 300
|
|
||||||
|
|
||||||
opt.scrolloff = 10 -- Lines of context
|
|
||||||
opt.expandtab = true
|
|
||||||
opt.smarttab = true
|
|
||||||
opt.textwidth = 0
|
|
||||||
opt.autoindent = true
|
|
||||||
opt.shiftwidth = 2
|
|
||||||
opt.tabstop = 2
|
|
||||||
opt.softtabstop = 2
|
|
||||||
opt.guifont = "Iosevka Nerd Font Mono"
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
|
||||||
vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
|
||||||
vim.keymap.set("n", "n", "nzzzv")
|
|
||||||
vim.keymap.set("n", "N", "Nzzzv")
|
|
||||||
|
|
||||||
vim.keymap.set("x", "<leader>p", [["_dP]])
|
|
||||||
vim.keymap.set({"n", "v"}, "<leader>y", [["+y]])
|
|
||||||
vim.keymap.set("n", "<leader>Y", [["+Y]])
|
|
||||||
vim.keymap.set({"n", "v"}, "<leader>d", [["_d]])
|
|
||||||
|
|
||||||
vim.keymap.set("n", "Q", "<nop>")
|
|
||||||
vim.keymap.set("n", "<c-f>", "<nop>")
|
|
||||||
|
|
||||||
vim.keymap.set("i", "jk", "<Esc>")
|
|
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"diagnostics.globals": [
|
|
||||||
"vim"
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
return {
|
|
||||||
'zSnails/NeoNeedsKey',
|
|
||||||
config = function ()
|
|
||||||
require("NeoNeedsKey").setup()
|
|
||||||
end
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
return {
|
|
||||||
'theprimeagen/harpoon',
|
|
||||||
keys = {
|
|
||||||
{ "<leader>a", function() require('harpoon.mark').add_file() end },
|
|
||||||
{ "<leader>e", function() require('harpoon.ui').toggle_quick_menu() end },
|
|
||||||
{ "<leader>k", function() require('harpoon.ui').nav_next() end },
|
|
||||||
{ "<leader>j", function() require('harpoon.ui').nav_prev() end },
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
return {
|
|
||||||
"rebelot/kanagawa.nvim",
|
|
||||||
config = function ()
|
|
||||||
vim.cmd.colorscheme "kanagawa"
|
|
||||||
end
|
|
||||||
}
|
|
@ -1,191 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
'folke/lazydev.nvim',
|
|
||||||
ft = 'lua',
|
|
||||||
opts = {
|
|
||||||
library = {
|
|
||||||
{ path = 'luvit-meta/library', words = { 'vim%.uv' } },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{ 'Bilal2453/luvit-meta', lazy = true },
|
|
||||||
{
|
|
||||||
'neovim/nvim-lspconfig',
|
|
||||||
cmd = 'LspInfo',
|
|
||||||
event = {'BufReadPre', 'BufNewFile'},
|
|
||||||
config = function()
|
|
||||||
vim.api.nvim_create_autocmd('LspAttach', {
|
|
||||||
group = vim.api.nvim_create_augroup('lsp-attach', { clear = true }),
|
|
||||||
callback = function(event)
|
|
||||||
local map = function(keys, func, desc, mode)
|
|
||||||
mode = mode or 'n'
|
|
||||||
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = "LSP: " .. desc })
|
|
||||||
end
|
|
||||||
|
|
||||||
map("gd", function() vim.lsp.buf.definition() end, 'goto defintion')
|
|
||||||
map("gr", function() vim.lsp.buf.references() end, 'goto references')
|
|
||||||
map("K", function() vim.lsp.buf.hover() end, 'hover')
|
|
||||||
map("<leader>ws", function() vim.lsp.buf.workspace_symbol() end, 'workspace symbols')
|
|
||||||
map("<leader>d", function() vim.diagnostic.open_float() end, 'diagnostic float')
|
|
||||||
map("[d", function() vim.diagnostic.jump({ count = 1, float = true }) end, 'next diagnostic')
|
|
||||||
map("]d", function() vim.diagnostic.jump({ count = -1, float = true }) end, 'prev diagnostic')
|
|
||||||
map("<leader>ca", function() vim.lsp.buf.code_action() end, 'code actions')
|
|
||||||
map("<leader>rn", function() vim.lsp.buf.rename() end, 'rename')
|
|
||||||
map("<C-h>", function() vim.lsp.buf.signature_help() end, 'signature help', "i")
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
|
||||||
capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
|
|
||||||
|
|
||||||
-- Server configs
|
|
||||||
local lsp = require('lspconfig')
|
|
||||||
|
|
||||||
-- vue
|
|
||||||
lsp.volar.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- typescript / javascript
|
|
||||||
require'lspconfig'.ts_ls.setup{
|
|
||||||
capabilities = capabilities,
|
|
||||||
init_options = {
|
|
||||||
plugins = {
|
|
||||||
{
|
|
||||||
name = "@vue/typescript-plugin",
|
|
||||||
location = "",
|
|
||||||
languages = {"javascript", "typescript", "vue"},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
filetypes = { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx", "vue" }
|
|
||||||
}
|
|
||||||
|
|
||||||
-- eslint
|
|
||||||
lsp.eslint.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- tailwind
|
|
||||||
lsp.tailwindcss.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
root_dir = lsp.util.root_pattern('tailwind.config.js', 'tailwind.config.cjs', 'tailwind.config.mjs', 'tailwind.config.ts')
|
|
||||||
})
|
|
||||||
|
|
||||||
-- html
|
|
||||||
lsp.html.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- go
|
|
||||||
lsp.gopls.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
})
|
|
||||||
lsp.golangci_lint_ls.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- templ
|
|
||||||
vim.filetype.add({ extension = { templ = "templ" } })
|
|
||||||
lsp.templ.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
})
|
|
||||||
|
|
||||||
lsp.lua_ls.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
})
|
|
||||||
|
|
||||||
lsp.nil_ls.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
})
|
|
||||||
|
|
||||||
lsp.ccls.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
})
|
|
||||||
lsp.astro.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
})
|
|
||||||
lsp.cssls.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
})
|
|
||||||
lsp.jdtls.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'hrsh7th/nvim-cmp',
|
|
||||||
event = 'InsertEnter',
|
|
||||||
dependencies = {
|
|
||||||
{
|
|
||||||
'L3MON4D3/LuaSnip',
|
|
||||||
build = (function()
|
|
||||||
-- Build Step is needed for regex support in snippets.
|
|
||||||
-- This step is not supported in many windows environments.
|
|
||||||
-- Remove the below condition to re-enable on windows.
|
|
||||||
if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
return 'make install_jsregexp'
|
|
||||||
end)(),
|
|
||||||
dependencies = {
|
|
||||||
{
|
|
||||||
'rafamadriz/friendly-snippets',
|
|
||||||
config = function()
|
|
||||||
require('luasnip.loaders.from_vscode').lazy_load()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'saadparwaiz1/cmp_luasnip',
|
|
||||||
'hrsh7th/cmp-nvim-lsp',
|
|
||||||
'hrsh7th/cmp-path',
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
-- See `:help cmp`
|
|
||||||
local cmp = require 'cmp'
|
|
||||||
local luasnip = require 'luasnip'
|
|
||||||
luasnip.config.setup {}
|
|
||||||
|
|
||||||
cmp.setup {
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
luasnip.lsp_expand(args.body)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
completion = { completeopt = 'menu,menuone,noinsert' },
|
|
||||||
mapping = cmp.mapping.preset.insert {
|
|
||||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
|
||||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
|
||||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
|
||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
|
||||||
['<C-y>'] = cmp.mapping.confirm { select = true },
|
|
||||||
['<C-Space>'] = cmp.mapping.complete {},
|
|
||||||
['<C-l>'] = cmp.mapping(function()
|
|
||||||
if luasnip.expand_or_locally_jumpable() then
|
|
||||||
luasnip.expand_or_jump()
|
|
||||||
end
|
|
||||||
end, { 'i', 's' }),
|
|
||||||
['<C-h>'] = cmp.mapping(function()
|
|
||||||
if luasnip.locally_jumpable(-1) then
|
|
||||||
luasnip.jump(-1)
|
|
||||||
end
|
|
||||||
end, { 'i', 's' }),
|
|
||||||
},
|
|
||||||
sources = {
|
|
||||||
{
|
|
||||||
name = 'lazydev',
|
|
||||||
-- set group index to 0 to skip loading LuaLS completions as lazydev recommends it
|
|
||||||
group_index = 0,
|
|
||||||
},
|
|
||||||
{ name = 'nvim_lsp' },
|
|
||||||
{ name = 'luasnip' },
|
|
||||||
{ name = 'path' },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'nvim-tree/nvim-web-devicons',
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,114 +0,0 @@
|
|||||||
return { -- Collection of various small independent plugins/modules
|
|
||||||
'echasnovski/mini.nvim',
|
|
||||||
version = false,
|
|
||||||
config = function()
|
|
||||||
local keymap = vim.keymap.set
|
|
||||||
|
|
||||||
require('mini.ai').setup { n_lines = 500 }
|
|
||||||
|
|
||||||
require('mini.surround').setup()
|
|
||||||
|
|
||||||
-- Simple and easy statusline.
|
|
||||||
local statusline = require 'mini.statusline'
|
|
||||||
statusline.setup { use_icons = true }
|
|
||||||
statusline.section_location = function()
|
|
||||||
return '%2l:%-2v'
|
|
||||||
end
|
|
||||||
|
|
||||||
require('mini.basics').setup({
|
|
||||||
options = {
|
|
||||||
extra_ui = true,
|
|
||||||
win_borders = "bold"
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
require('mini.comment').setup()
|
|
||||||
|
|
||||||
local icons = require('mini.icons')
|
|
||||||
icons.setup()
|
|
||||||
icons.tweak_lsp_kind()
|
|
||||||
|
|
||||||
require('mini.indentscope').setup({
|
|
||||||
draw = {
|
|
||||||
delay = 0,
|
|
||||||
animation = require('mini.indentscope').gen_animation.none()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
require('mini.diff').setup()
|
|
||||||
|
|
||||||
require('mini.extra').setup()
|
|
||||||
|
|
||||||
require('mini.jump').setup()
|
|
||||||
|
|
||||||
-- require('mini.jump2d').setup()
|
|
||||||
|
|
||||||
local files = require('mini.files')
|
|
||||||
files.setup()
|
|
||||||
keymap("n", "<leader>fe", function() files.open(vim.api.nvim_buf_get_name(0)) end, { noremap = true, silent = true })
|
|
||||||
|
|
||||||
require('mini.git').setup()
|
|
||||||
|
|
||||||
local hipatterns = require('mini.hipatterns')
|
|
||||||
hipatterns.setup({
|
|
||||||
highlighters = {
|
|
||||||
-- Highlight standalone 'FIXME', 'HACK', 'TODO', 'NOTE'
|
|
||||||
fixme = { pattern = '%f[%w]()FIXME()%f[%W]', group = 'MiniHipatternsFixme' },
|
|
||||||
hack = { pattern = '%f[%w]()HACK()%f[%W]', group = 'MiniHipatternsHack' },
|
|
||||||
todo = { pattern = '%f[%w]()TODO()%f[%W]', group = 'MiniHipatternsTodo' },
|
|
||||||
note = { pattern = '%f[%w]()NOTE()%f[%W]', group = 'MiniHipatternsNote' },
|
|
||||||
|
|
||||||
-- Highlight hex color strings (`#rrggbb`) using that color
|
|
||||||
hex_color = hipatterns.gen_highlighter.hex_color(),
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
require('mini.move').setup()
|
|
||||||
|
|
||||||
require('mini.notify').setup()
|
|
||||||
|
|
||||||
require('mini.pairs').setup()
|
|
||||||
|
|
||||||
local pick = require('mini.pick')
|
|
||||||
pick.setup()
|
|
||||||
keymap("n", "<leader>ff", pick.builtin.files, { noremap = true, silent = true })
|
|
||||||
keymap("n", "<leader>fg", pick.builtin.grep_live, { noremap = true, silent = true })
|
|
||||||
keymap("n", "<leader>fwg", function()
|
|
||||||
local wrd = vim.fn.expand("<cword>")
|
|
||||||
pick.builtin.grep({ pattern = wrd })
|
|
||||||
end, { noremap = true, silent = true })
|
|
||||||
|
|
||||||
-- require('mini.base16').setup({
|
|
||||||
-- palette = {
|
|
||||||
-- base00 = "#303446",
|
|
||||||
-- base01 = "#292c3c",
|
|
||||||
-- base02 = "#414559",
|
|
||||||
-- base03 = "#51576d",
|
|
||||||
-- base04 = "#626880",
|
|
||||||
-- base05 = "#c6d0f5",
|
|
||||||
-- base06 = "#f2d5cf",
|
|
||||||
-- base07 = "#babbf1",
|
|
||||||
-- base08 = "#e78284",
|
|
||||||
-- base09 = "#ef9f76",
|
|
||||||
-- base0A = "#e5c890",
|
|
||||||
-- base0B = "#a6d189",
|
|
||||||
-- base0C = "#81c8be",
|
|
||||||
-- base0D = "#8caaee",
|
|
||||||
-- base0E = "#ca9ee6",
|
|
||||||
-- base0F = "#eebebe",
|
|
||||||
-- }
|
|
||||||
-- })
|
|
||||||
--
|
|
||||||
-- require('mini.hues').setup({
|
|
||||||
-- foreground = '#ffffff',
|
|
||||||
-- background = '#000000',
|
|
||||||
-- n_hues = 0,
|
|
||||||
-- accent = 'orange',
|
|
||||||
-- saturation = 'high'
|
|
||||||
-- })
|
|
||||||
|
|
||||||
require('mini.splitjoin').setup()
|
|
||||||
|
|
||||||
require('mini.trailspace').setup()
|
|
||||||
end,
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
return {
|
|
||||||
"nvim-neotest/neotest",
|
|
||||||
lazy = false,
|
|
||||||
dependencies = {
|
|
||||||
"nvim-neotest/nvim-nio",
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
"antoinemadec/FixCursorHold.nvim",
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
"marilari88/neotest-vitest",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("neotest").setup({
|
|
||||||
adapters = {
|
|
||||||
require("neotest-vitest") {
|
|
||||||
-- Filter directories when searching for test files. Useful in large projects (see Filter directories notes).
|
|
||||||
filter_dir = function(name, rel_path, root)
|
|
||||||
return name ~= "node_modules" and name ~=".direnv"
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>tt", function() require("neotest").run.run() end)
|
|
||||||
vim.keymap.set("n", "<leader>tf", function() require("neotest").run.run(vim.fn.expand("%")) end)
|
|
||||||
vim.keymap.set("n", "<leader>ts", function() require("neotest").summary.toggle() end)
|
|
||||||
vim.keymap.set("n", "<leader>to", function() require("neotest").output.open({ enter = true }) end)
|
|
||||||
vim.keymap.set("n", "<leader>tp", function() require("neotest").output_panel.toggle() end)
|
|
||||||
end,
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
return {
|
|
||||||
"christoomey/vim-tmux-navigator",
|
|
||||||
cmd = {
|
|
||||||
"TmuxNavigateLeft",
|
|
||||||
"TmuxNavigateDown",
|
|
||||||
"TmuxNavigateUp",
|
|
||||||
"TmuxNavigateRight",
|
|
||||||
"TmuxNavigatePrevious",
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
|
|
||||||
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
|
|
||||||
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
|
|
||||||
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
|
|
||||||
{ "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
|||||||
return {
|
|
||||||
'MeanderingProgrammer/render-markdown.nvim',
|
|
||||||
dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite
|
|
||||||
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins
|
|
||||||
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
|
|
||||||
---@module 'render-markdown'
|
|
||||||
---@type render.md.UserConfig
|
|
||||||
opts = {
|
|
||||||
-- heading = {
|
|
||||||
-- position = 'inline',
|
|
||||||
-- },
|
|
||||||
sign = {
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
return {
|
|
||||||
'xiyaowong/transparent.nvim',
|
|
||||||
lazy = false,
|
|
||||||
}
|
|
@ -1,71 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
'nvim-treesitter/nvim-treesitter',
|
|
||||||
config = function()
|
|
||||||
require('nvim-treesitter.configs').setup({
|
|
||||||
sync_install = false,
|
|
||||||
auto_install = true,
|
|
||||||
indent = { enable = true },
|
|
||||||
highlight = { enable = true },
|
|
||||||
autotag = { enable = true },
|
|
||||||
|
|
||||||
-- text object selection
|
|
||||||
textobjects = {
|
|
||||||
select = {
|
|
||||||
enable = true,
|
|
||||||
|
|
||||||
-- Automatically jump forward to textobj, similar to targets.vim
|
|
||||||
lookahead = true,
|
|
||||||
|
|
||||||
keymaps = {
|
|
||||||
-- You can use the capture groups defined in textobjects.scm
|
|
||||||
["af"] = "@function.outer",
|
|
||||||
["if"] = "@function.inner",
|
|
||||||
["ac"] = "@class.outer",
|
|
||||||
["ic"] = "@class.inner",
|
|
||||||
-- You can also use captures from other query groups like `locals.scm`
|
|
||||||
["as"] = { query = "@scope", query_group = "locals", desc = "Select language scope" },
|
|
||||||
},
|
|
||||||
-- You can choose the select mode (default is charwise 'v')
|
|
||||||
--
|
|
||||||
-- Can also be a function which gets passed a table with the keys
|
|
||||||
-- * query_string: eg '@function.inner'
|
|
||||||
-- * method: eg 'v' or 'o'
|
|
||||||
-- and should return the mode ('v', 'V', or '<c-v>') or a table
|
|
||||||
-- mapping query_strings to modes.
|
|
||||||
selection_modes = {
|
|
||||||
['@parameter.outer'] = 'v', -- charwise
|
|
||||||
['@function.outer'] = 'V', -- linewise
|
|
||||||
['@class.outer'] = '<c-v>', -- blockwise
|
|
||||||
},
|
|
||||||
-- If you set this to `true` (default is `false`) then any textobject is
|
|
||||||
-- extended to include preceding or succeeding whitespace. Succeeding
|
|
||||||
-- whitespace has priority in order to act similarly to eg the built-in
|
|
||||||
-- `ap`.
|
|
||||||
--
|
|
||||||
-- Can also be a function which gets passed a table with the keys
|
|
||||||
-- * query_string: eg '@function.inner'
|
|
||||||
-- * selection_mode: eg 'v'
|
|
||||||
-- and should return true of false
|
|
||||||
include_surrounding_whitespace = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
vim.wo.foldmethod = 'expr'
|
|
||||||
vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
|
|
||||||
|
|
||||||
function _G.MyFoldText()
|
|
||||||
local line = vim.fn.getline(vim.v.foldstart)
|
|
||||||
return line .. " "
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.opt.foldtext = 'v:lua.MyFoldText()'
|
|
||||||
vim.opt.fillchars:append(',fold: ')
|
|
||||||
vim.opt.foldlevel = 99;
|
|
||||||
end
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'nvim-treesitter/nvim-treesitter-textobjects'
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
|||||||
return {
|
|
||||||
'mbbill/undotree',
|
|
||||||
keys = {
|
|
||||||
{ "<leader>u", vim.cmd.UndotreeToggle, desc = "Undotree" },
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
return {
|
|
||||||
'lervag/wiki.vim',
|
|
||||||
config = function()
|
|
||||||
vim.g.wiki_root = '~/wiki'
|
|
||||||
end
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
return {
|
|
||||||
"folke/zen-mode.nvim",
|
|
||||||
opts = {
|
|
||||||
window = {
|
|
||||||
width = 80,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
@ -5,6 +5,10 @@
|
|||||||
inputs.nixvim.homeManagerModules.nixvim
|
inputs.nixvim.homeManagerModules.nixvim
|
||||||
];
|
];
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
alejandra
|
||||||
|
];
|
||||||
|
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
@ -228,6 +232,19 @@
|
|||||||
servers = {
|
servers = {
|
||||||
nixd = {
|
nixd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
formatting = {
|
||||||
|
command = [ "alejandra" ];
|
||||||
|
};
|
||||||
|
options = {
|
||||||
|
nix-darwin = {
|
||||||
|
expr = "(builtins.getFlake (\"git+file://\" + toString ./.)).darwinConfigurations.macbook.options";
|
||||||
|
};
|
||||||
|
home-manager = {
|
||||||
|
expr = "(import <home-manager/modules> { configuration = ~/.config/home-manager/home.nix; pkgs = import <nixpkgs> {}; }).options";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
ts_ls = {
|
ts_ls = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user