neovim cleanup
This commit is contained in:
@@ -1,125 +0,0 @@
|
||||
{ pkgs, config, ... }:
|
||||
|
||||
let
|
||||
deferred-clipboard-nvim = pkgs.vimUtils.buildVimPlugin {
|
||||
name = "deferred-clipboard-nvim";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "EtiamNullam";
|
||||
repo = "deferred-clipboard.nvim";
|
||||
rev = "f58d9a20fe5d5891c61773814a1f3051ce43c006";
|
||||
hash = "sha256-HTk70Fb4n/F4nVkfxSKRsgrXnoFwMpSV276WvDt5uY0=";
|
||||
};
|
||||
};
|
||||
mkLuaConfig = file: args:
|
||||
builtins.readFile (pkgs.replaceVars file args);
|
||||
in {
|
||||
home.sessionVariables = { EDITOR = "nvim"; };
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
withNodeJs = true;
|
||||
withPython3 = true;
|
||||
plugins = (with pkgs.vimPlugins; [
|
||||
catppuccin-nvim
|
||||
cmp-buffer
|
||||
cmp-conjure
|
||||
cmp-nvim-lua
|
||||
cmp-nvim-lsp
|
||||
cmp-path
|
||||
cmp_luasnip
|
||||
conform-nvim
|
||||
conjure
|
||||
comment-nvim
|
||||
deferred-clipboard-nvim
|
||||
dropbar-nvim
|
||||
friendly-snippets
|
||||
lazy-nvim
|
||||
lean-nvim
|
||||
leap-nvim
|
||||
lspkind-nvim
|
||||
lualine-lsp-progress
|
||||
lualine-nvim
|
||||
luasnip
|
||||
markdown-preview-nvim
|
||||
neoconf-nvim
|
||||
neodev-nvim
|
||||
neoscroll-nvim
|
||||
nvim-autopairs
|
||||
nvim-cmp
|
||||
nvim-lspconfig
|
||||
nvim-surround
|
||||
nvim-tree-lua
|
||||
nvim-treesitter-textobjects
|
||||
nvim-ts-context-commentstring
|
||||
nvim-web-devicons
|
||||
oil-nvim
|
||||
plenary-nvim
|
||||
rainbow-delimiters-nvim
|
||||
telescope-fzf-native-nvim
|
||||
telescope-nvim
|
||||
vimtex
|
||||
which-key-nvim
|
||||
|
||||
]) ++ [
|
||||
(pkgs.vimPlugins.nvim-treesitter.withPlugins
|
||||
(plugins: pkgs.tree-sitter.allGrammars))
|
||||
];
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
ripgrep
|
||||
fd
|
||||
codespell
|
||||
prettierd
|
||||
# Lua
|
||||
lua-language-server
|
||||
stylua
|
||||
# Haskell
|
||||
haskell-language-server
|
||||
ghc
|
||||
stack
|
||||
cabal-install
|
||||
haskellPackages.fourmolu
|
||||
# Lean
|
||||
lean
|
||||
# Python
|
||||
ruff
|
||||
pyright
|
||||
isort
|
||||
python311Packages.autopep8
|
||||
# LaTeX
|
||||
texlab
|
||||
xdotool
|
||||
pplatex
|
||||
neovim-remote
|
||||
# Nix
|
||||
nixd
|
||||
nixfmt-rfc-style
|
||||
# Rust
|
||||
rust-analyzer
|
||||
# Bash
|
||||
nodePackages.bash-language-server
|
||||
shellcheck
|
||||
shellharden
|
||||
# sh
|
||||
shfmt
|
||||
# Scheme
|
||||
chez
|
||||
nerd-fonts.jetbrains-mono
|
||||
texliveFull
|
||||
clang-tools
|
||||
];
|
||||
|
||||
extraLuaConfig = mkLuaConfig ./init.lua {
|
||||
path = "${pkgs.vimUtils.packDir
|
||||
config.programs.neovim.finalPackage.passthru.packpathDirs}";
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile."nvim/lua" = {
|
||||
recursive = true;
|
||||
source = ./lua;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
vim.g.mapleader = " "
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- Import plugins from lua/plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
performance = {
|
||||
reset_packpath = false,
|
||||
rtp = {
|
||||
reset = false,
|
||||
},
|
||||
},
|
||||
dev = {
|
||||
path = "@path@/pack/myNeovimPackages/start",
|
||||
patterns = {
|
||||
"folke",
|
||||
"catppuccin",
|
||||
"geodimm",
|
||||
"Julian",
|
||||
"hrsh7th",
|
||||
"neovim",
|
||||
"rafamadriz",
|
||||
"saadparwaiz1",
|
||||
"L3MON4D3",
|
||||
"onsails",
|
||||
"nvim-lua",
|
||||
"Olical",
|
||||
"PaterJason",
|
||||
"iamcco",
|
||||
"nvim-treesitter",
|
||||
"HiPhish",
|
||||
"lervag",
|
||||
"windwp",
|
||||
"kylechui",
|
||||
"numToStr",
|
||||
"JoosepAlviste",
|
||||
"stevearc",
|
||||
"nvim-tree",
|
||||
"tpope",
|
||||
"karb94",
|
||||
"akinsho",
|
||||
"nvim-lualine",
|
||||
"arkav",
|
||||
"nvimdev",
|
||||
"ggandor",
|
||||
"Bekaboo",
|
||||
"nvim-telescope",
|
||||
"aserowy",
|
||||
"3rd",
|
||||
"epwalsh",
|
||||
"preservim",
|
||||
"elkowar",
|
||||
"dynamotn",
|
||||
"LhKipp",
|
||||
"Fanael",
|
||||
},
|
||||
},
|
||||
install = {
|
||||
-- Safeguard in case we forget to install a plugin with Nix
|
||||
missing = false,
|
||||
},
|
||||
})
|
||||
require("config/options")
|
||||
@@ -1,14 +0,0 @@
|
||||
local opt = vim.opt
|
||||
|
||||
opt.clipboard = "unnamedplus"
|
||||
opt.cursorline = true -- Enable highlighting of the current line
|
||||
opt.expandtab = true -- Use spaces instead of tabs
|
||||
opt.list = true -- Show some invisible characters (tabs...
|
||||
opt.mouse = "a" -- Enable mouse mode
|
||||
opt.number = true -- Print line number
|
||||
opt.relativenumber = true -- Relative line numbers
|
||||
opt.shiftround = true -- Round indent
|
||||
opt.shiftwidth = 2 -- Size of an indent
|
||||
opt.smartindent = true -- Insert indents automatically
|
||||
opt.spelllang = { "en" }
|
||||
opt.tabstop = 2 -- Number of spaces tabs count for
|
||||
@@ -1,49 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin-nvim",
|
||||
priority = 1000,
|
||||
config = function()
|
||||
require("catppuccin").setup()
|
||||
vim.cmd.colorscheme("catppuccin-mocha")
|
||||
end,
|
||||
opts = {
|
||||
flavor = "mocha",
|
||||
integrations = {
|
||||
nvimtree = true,
|
||||
dashboard = true,
|
||||
which_key = true,
|
||||
cmp = true,
|
||||
markdown = true,
|
||||
leap = true,
|
||||
telescope = {
|
||||
enabled = true,
|
||||
},
|
||||
treesitter = true,
|
||||
rainbow_delimiters = true,
|
||||
dropbar = {
|
||||
enabled = false,
|
||||
color_mode = false, -- enable color for kind's texts, not just kind's icons
|
||||
},
|
||||
native_lsp = {
|
||||
enabled = true,
|
||||
virtual_text = {
|
||||
errors = { "italic" },
|
||||
hints = { "italic" },
|
||||
warnings = { "italic" },
|
||||
information = { "italic" },
|
||||
},
|
||||
underlines = {
|
||||
errors = { "underline" },
|
||||
hints = { "underline" },
|
||||
warnings = { "underline" },
|
||||
information = { "underline" },
|
||||
},
|
||||
inlay_hints = {
|
||||
background = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
event = { "BufWritePre" },
|
||||
cmd = "ConformInfo",
|
||||
keys = {
|
||||
{
|
||||
"<leader>cF",
|
||||
function()
|
||||
require("conform").format({ formatters = { "injected" } })
|
||||
end,
|
||||
mode = { "n", "v" },
|
||||
desc = "Format Injected Langs",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("conform").setup({
|
||||
format_on_save = {
|
||||
-- These options will be passed to conform.format()
|
||||
timeout_ms = 500,
|
||||
lsp_fallback = true,
|
||||
},
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
python = { "isort", "autopep8" },
|
||||
haskell = { "fourmolu" },
|
||||
bash = { "shellcheck", "shellharden" },
|
||||
sh = { "shfmt" },
|
||||
markdown = { "prettierd" },
|
||||
json = { "prettierd" },
|
||||
yaml = { "prettierd" },
|
||||
nix = { "nixfmt-rfc-style" },
|
||||
tex = { "latexindent" },
|
||||
c = { "clang_format" },
|
||||
cpp = { "clang_format" },
|
||||
-- ["*"] = { "codespell" },
|
||||
["_"] = { "trim_whitespace" },
|
||||
},
|
||||
formatters = {
|
||||
stylua = {
|
||||
inherit = true,
|
||||
prepend_args = { "--indent-type", "Spaces", "--indent-width", "2" },
|
||||
},
|
||||
codespell = {
|
||||
inherit = true,
|
||||
prepend_args = { "-L", "launch" },
|
||||
},
|
||||
latexindent = {
|
||||
inherit = true,
|
||||
prepend_args = { "-y=\"defaultIndent:' '\"" },
|
||||
},
|
||||
clang_format = {
|
||||
prepend_args = {
|
||||
"--fallback-style=LLVM",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"Olical/conjure",
|
||||
ft = { "lua", "python", "scheme" },
|
||||
dependencies = {
|
||||
{
|
||||
"PaterJason/cmp-conjure",
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
local config = cmp.get_config()
|
||||
table.insert(config.sources, {
|
||||
name = "buffer",
|
||||
option = {
|
||||
sources = {
|
||||
{ name = "conjure" },
|
||||
},
|
||||
},
|
||||
})
|
||||
cmp.setup(config)
|
||||
end,
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("conjure.main").main()
|
||||
require("conjure.mapping")["on-filetype"]()
|
||||
vim.g["conjure#debug"] = false
|
||||
vim.g["conjure#client#scheme#stdio#command"] = "scheme"
|
||||
vim.g["conjure#client#scheme#stdio#prompt_pattern"] = "> $?"
|
||||
vim.g["conjure#mapping#prefix"] = "<leader>,"
|
||||
vim.g["conjure#extract#tree_sitter#enabled"] = true
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"Bekaboo/dropbar.nvim",
|
||||
-- optional, but required for fuzzy finder support
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
},
|
||||
config = function()
|
||||
vim.keymap.set("n", "<leader>bs", function()
|
||||
require("dropbar.api").pick(vim.v.count ~= 0 and vim.v.count)
|
||||
end)
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
'mrccjkb/haskell-tools.nvim',
|
||||
version = '^3',
|
||||
lazy = false,
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
return {
|
||||
"Julian/lean.nvim",
|
||||
event = { "BufReadPre *.lean", "BufNewFile *.lean" },
|
||||
|
||||
dependencies = {
|
||||
"neovim/nvim-lspconfig",
|
||||
"nvim-lua/plenary.nvim",
|
||||
-- you also will likely want nvim-cmp or some completion engine
|
||||
},
|
||||
|
||||
-- see details below for full configuration options
|
||||
opts = {
|
||||
lsp = {
|
||||
on_attach = on_attach,
|
||||
},
|
||||
mappings = true,
|
||||
},
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"ggandor/leap.nvim",
|
||||
config = function()
|
||||
local leap = require("leap")
|
||||
|
||||
leap.opts.special_keys.prev_target = "<bs>"
|
||||
leap.opts.special_keys.prev_group = "<bs>"
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons", "arkav/lualine-lsp-progress" },
|
||||
config = function()
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
theme = "catppuccin",
|
||||
},
|
||||
sections = {
|
||||
lualine_c = {
|
||||
"lsp_progress",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"iamcco/markdown-preview.nvim",
|
||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||
ft = { "markdown" },
|
||||
config = function()
|
||||
vim.g.mkdp_theme = "dark"
|
||||
vim.g.mkdp_echo_preview_url = 1
|
||||
vim.g.mkdp_browser = "luakit"
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"karb94/neoscroll.nvim",
|
||||
config = function()
|
||||
require("neoscroll").setup({
|
||||
-- All these keys will be mapped to their corresponding default scrolling animation
|
||||
mappings = { "<C-u>", "<C-d>", "<C-b>", "<C-f>", "<C-y>", "<C-e>", "zt", "zz", "zb" },
|
||||
hide_cursor = true, -- Hide cursor while scrolling
|
||||
stop_eof = true, -- Stop at <EOF> when scrolling downwards
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = { "InsertEnter" },
|
||||
dependencies = {
|
||||
"hrsh7th/nvim-cmp",
|
||||
},
|
||||
config = function()
|
||||
-- import nvim-autopairs
|
||||
local autopairs = require("nvim-autopairs")
|
||||
|
||||
-- configure autopairs
|
||||
autopairs.setup({
|
||||
check_ts = true, -- enable treesitter
|
||||
})
|
||||
|
||||
-- import nvim-autopairs completion functionality
|
||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||
|
||||
-- import nvim-cmp plugin (completions plugin)
|
||||
local cmp = require("cmp")
|
||||
|
||||
-- make autopairs and completion work together
|
||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
return {
|
||||
-- auto completion
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
event = "InsertEnter",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-buffer", -- source for text in buffer
|
||||
"hrsh7th/cmp-path", -- source for file system paths
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"L3MON4D3/LuaSnip", -- snippet engine
|
||||
"saadparwaiz1/cmp_luasnip", -- for autocompletion
|
||||
"rafamadriz/friendly-snippets", -- useful snippets
|
||||
"onsails/lspkind.nvim", -- vs-code like pictograms
|
||||
"PaterJason/cmp-conjure", -- nvim-cmp source for conjure.
|
||||
},
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
local lspkind = require("lspkind")
|
||||
|
||||
-- loads vscode style snippets from installed plugins (e.g. friendly-snippets)
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
|
||||
cmp.setup({
|
||||
completion = {
|
||||
completeopt = "menu,menuone,noinsert",
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-u>"] = cmp.mapping.scroll_docs(-4), -- Up
|
||||
["<C-d>"] = cmp.mapping.scroll_docs(4), -- Down
|
||||
["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions
|
||||
["<C-e>"] = cmp.mapping.abort(), -- close completion window
|
||||
["<CR>"] = cmp.mapping.confirm({ select = false }),
|
||||
["<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 for autocompletion
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "path" },
|
||||
{ name = "buffer" },
|
||||
{ name = "conjure" },
|
||||
}),
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
-- configure lspkind for vs-code like pictograms in completion menu
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
maxwidth = 50,
|
||||
ellipsis_char = "...",
|
||||
}),
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
return {
|
||||
-- lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = {
|
||||
{ "folke/neoconf.nvim", dependencies = { "nvim-lspconfig" } },
|
||||
{ "folke/neodev.nvim", opts = {} },
|
||||
},
|
||||
config = function()
|
||||
local lspconfig = require("lspconfig")
|
||||
local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
||||
local keymap = vim.keymap
|
||||
|
||||
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
|
||||
for type, icon in pairs(signs) do
|
||||
local hl = "DiagnosticSign" .. type
|
||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
|
||||
end
|
||||
|
||||
local opts = { noremap = true, silent = true }
|
||||
local on_attach = function(client, bufnr)
|
||||
opts.buffer = bufnr
|
||||
|
||||
-- set keybinds
|
||||
opts.desc = "Show LSP references"
|
||||
keymap.set("n", "gR", "<cmd>Telescope lsp_references<CR>", opts) -- show definition, references
|
||||
|
||||
opts.desc = "Go to declaration"
|
||||
keymap.set("n", "gD", vim.lsp.buf.declaration, opts) -- go to declaration
|
||||
|
||||
opts.desc = "Show LSP definitions"
|
||||
keymap.set("n", "gd", "<cmd>Telescope lsp_definitions<CR>", opts) -- show lsp definitions
|
||||
|
||||
opts.desc = "Show LSP implementations"
|
||||
keymap.set("n", "gi", "<cmd>Telescope lsp_implementations<CR>", opts) -- show lsp implementations
|
||||
|
||||
opts.desc = "Show LSP type definitions"
|
||||
keymap.set("n", "gt", "<cmd>Telescope lsp_type_definitions<CR>", opts) -- show lsp type definitions
|
||||
|
||||
opts.desc = "See available code actions"
|
||||
keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, opts) -- see available code actions, in visual mode will apply to selection
|
||||
|
||||
opts.desc = "Smart rename"
|
||||
keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts) -- smart rename
|
||||
|
||||
opts.desc = "Show buffer diagnostics"
|
||||
keymap.set("n", "<leader>D", "<cmd>Telescope diagnostics bufnr=0<CR>", opts) -- show diagnostics for file
|
||||
|
||||
opts.desc = "Show line diagnostics"
|
||||
keymap.set("n", "<leader>d", vim.diagnostic.open_float, opts) -- show diagnostics for line
|
||||
|
||||
opts.desc = "Go to previous diagnostic"
|
||||
keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) -- jump to previous diagnostic in buffer
|
||||
|
||||
opts.desc = "Go to next diagnostic"
|
||||
keymap.set("n", "]d", vim.diagnostic.goto_next, opts) -- jump to next diagnostic in buffer
|
||||
|
||||
opts.desc = "Show documentation for what is under cursor"
|
||||
keymap.set("n", "K", vim.lsp.buf.hover, opts) -- show documentation for what is under cursor
|
||||
|
||||
opts.desc = "Restart LSP"
|
||||
keymap.set("n", "<leader>rs", ":LspRestart<CR>", opts) -- mapping to restart lsp if necessary
|
||||
end
|
||||
|
||||
local capabilities = cmp_nvim_lsp.default_capabilities()
|
||||
|
||||
lspconfig["lua_ls"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
lspconfig["hls"].setup({
|
||||
filetypes = { "haskell", "lhaskell", "cabal" },
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
lspconfig["leanls"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
lspconfig["bashls"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
lspconfig["pyright"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
lspconfig["ruff"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
lspconfig["texlab"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
lspconfig["nixd"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
lspconfig["rust_analyzer"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"kylechui/nvim-surround",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("nvim-surround").setup({})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
lazy = false,
|
||||
keys = {
|
||||
{ "<leader>ft", "<CMD>NvimTreeToggle<CR>", desc = "Nvim Tree" },
|
||||
},
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
config = function()
|
||||
require("nvim-tree").setup({
|
||||
hijack_netrw = false,
|
||||
hijack_unnamed_buffer_when_opening = false,
|
||||
hijack_directories = {
|
||||
enable = false,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
local treesitter = require("nvim-treesitter.configs")
|
||||
|
||||
treesitter.setup({
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = { "latex" },
|
||||
additional_vim_regex_highlighting = { "latex", "markdown" },
|
||||
},
|
||||
indent = { enable = true },
|
||||
})
|
||||
end,
|
||||
dependencies = {
|
||||
"HiPhish/rainbow-delimiters",
|
||||
name = "rainbow-delimiters.nvim",
|
||||
config = function()
|
||||
-- This module contains a number of default definitions
|
||||
local rainbow_delimiters = require("rainbow-delimiters")
|
||||
|
||||
vim.g.rainbow_delimiters = {
|
||||
strategy = {
|
||||
[""] = rainbow_delimiters.strategy["global"],
|
||||
vim = rainbow_delimiters.strategy["local"],
|
||||
},
|
||||
query = {
|
||||
[""] = "rainbow-delimiters",
|
||||
lua = "rainbow-blocks",
|
||||
},
|
||||
priority = {
|
||||
[""] = 110,
|
||||
lua = 210,
|
||||
},
|
||||
highlight = {
|
||||
"RainbowDelimiterRed",
|
||||
"RainbowDelimiterYellow",
|
||||
"RainbowDelimiterBlue",
|
||||
"RainbowDelimiterOrange",
|
||||
"RainbowDelimiterGreen",
|
||||
"RainbowDelimiterViolet",
|
||||
"RainbowDelimiterCyan",
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
dependencies = {
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
name = "comment.nvim",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("Comment").setup({
|
||||
pre_hook = function()
|
||||
return vim.bo.commentstring
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"stevearc/oil.nvim",
|
||||
opts = {},
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("oil").setup({
|
||||
default_file_explorer = true,
|
||||
delete_to_trash = true,
|
||||
experimental_watch_for_changes = true,
|
||||
use_default_keymaps = true,
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
{ "-", "<CMD>Oil<CR>", desc = "Open parent directory" },
|
||||
},
|
||||
-- Optional dependencies
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
},
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
return {
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
config = function()
|
||||
require("telescope").setup({})
|
||||
-- To get fzf loaded and working with telescope, you need to call
|
||||
-- load_extension, somewhere after setup function:
|
||||
require("telescope").load_extension("fzf")
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
config = function()
|
||||
require("telescope").setup({})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"lervag/vimtex",
|
||||
lazy = false, -- lazy-loading will disable inverse search
|
||||
config = function()
|
||||
vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
group = vim.api.nvim_create_augroup("lazyvim_vimtex_conceal", { clear = true }),
|
||||
pattern = { "bib", "tex" },
|
||||
callback = function()
|
||||
vim.wo.conceallevel = 2
|
||||
end,
|
||||
})
|
||||
|
||||
vim.g.vimtex_compiler_latexmk = {
|
||||
options = {
|
||||
"-verbose",
|
||||
"-file-line-error",
|
||||
"-synctex=1",
|
||||
"-interaction=nonstopmode",
|
||||
"-shell-escape",
|
||||
},
|
||||
}
|
||||
|
||||
vim.g.vimtex_mappings_disable = { ["n"] = { "K" } } -- disable `K` as it conflicts with LSP hover
|
||||
vim.g.vimtex_quickfix_method = "pplatex"
|
||||
vim.g.vimtex_view_method = "zathura"
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
init = function()
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 300
|
||||
end,
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
@@ -30,9 +30,9 @@
|
||||
extraPackages = with pkgs; [
|
||||
texliveFull
|
||||
texlivePackages.standalone
|
||||
texlivePackages.relsize # needed for BA
|
||||
# papis-nvim
|
||||
]
|
||||
;
|
||||
];
|
||||
extraConfigVim = ''
|
||||
filetype plugin on
|
||||
set nocompatible
|
||||
|
||||
Reference in New Issue
Block a user