mirror of
https://github.com/isabelroses/nvim.git
synced 2025-04-09 13:29:34 +00:00
chore: cleanup
This commit is contained in:
parent
e09566296f
commit
3464597f33
4 changed files with 4 additions and 105 deletions
|
@ -2,10 +2,6 @@
|
|||
fetch.github = "goolord/alpha-nvim"
|
||||
src.git = "https://github.com/goolord/alpha-nvim"
|
||||
|
||||
# [bufferline]
|
||||
# fetch.github = "akinsho/bufferline.nvim"
|
||||
# src.git = "https://github.com/akinsho/bufferline.nvim"
|
||||
|
||||
[catppuccin]
|
||||
fetch.github = "catppuccin/nvim"
|
||||
src.git = "https://github.com/catppuccin/nvim"
|
||||
|
@ -18,10 +14,6 @@ src.git = "https://github.com/hrsh7th/cmp-buffer"
|
|||
fetch.github = "hrsh7th/cmp-cmdline"
|
||||
src.git = "https://github.com/hrsh7th/cmp-cmdline"
|
||||
|
||||
[cmp-git]
|
||||
fetch.github = "petertriho/cmp-git"
|
||||
src.git = "https://github.com/petertriho/cmp-git"
|
||||
|
||||
[cmp-nvim-lsp]
|
||||
fetch.github = "hrsh7th/cmp-nvim-lsp"
|
||||
src.git = "https://github.com/hrsh7th/cmp-nvim-lsp"
|
||||
|
@ -100,18 +92,10 @@ src.git = "https://github.com/nvim-lualine/lualine.nvim"
|
|||
fetch.github = "L3MON4D3/LuaSnip"
|
||||
src.git = "https://github.com/L3MON4D3/LuaSnip"
|
||||
|
||||
[neoconf]
|
||||
fetch.github = "folke/neoconf.nvim"
|
||||
src.git = "https://github.com/folke/neoconf.nvim"
|
||||
|
||||
[neodev]
|
||||
fetch.github = "folke/neodev.nvim"
|
||||
src.git = "https://github.com/folke/neodev.nvim"
|
||||
|
||||
[neorepl]
|
||||
fetch.github = "ii14/neorepl.nvim"
|
||||
src.git = "https://github.com/ii14/neorepl.nvim"
|
||||
|
||||
[neovim-session-manager]
|
||||
fetch.github = "Shatur/neovim-session-manager"
|
||||
src.git = "https://github.com/Shatur/neovim-session-manager"
|
||||
|
@ -160,14 +144,6 @@ src.git = "https://github.com/nvim-tree/nvim-tree.lua"
|
|||
fetch.github = "nvim-treesitter/nvim-treesitter"
|
||||
src.git = "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||
|
||||
[nvim-treesitter-context]
|
||||
fetch.github = "nvim-treesitter/nvim-treesitter-context"
|
||||
src.git = "https://github.com/nvim-treesitter/nvim-treesitter-context"
|
||||
|
||||
[nvim-treesitter-textobjects]
|
||||
fetch.github = "nvim-treesitter/nvim-treesitter-textobjects"
|
||||
src.git = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects"
|
||||
|
||||
[nvim-web-devicons]
|
||||
fetch.github = "nvim-tree/nvim-web-devicons"
|
||||
src.git = "https://github.com/nvim-tree/nvim-web-devicons"
|
||||
|
@ -192,10 +168,6 @@ src.git = "https://github.com/hallerpatrick/py_lsp.nvim"
|
|||
fetch.github = "hiphish/rainbow-delimiters.nvim"
|
||||
src.git = "https://github.com/hiphish/rainbow-delimiters.nvim"
|
||||
|
||||
[rust-tools]
|
||||
fetch.github = "simrat39/rust-tools.nvim"
|
||||
src.git = "https://github.com/simrat39/rust-tools.nvim"
|
||||
|
||||
[schemastore]
|
||||
fetch.github = "b0o/schemastore.nvim"
|
||||
src.git = "https://github.com/b0o/schemastore.nvim"
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
local neoconf_present, neoconf = pcall(require, "neoconf")
|
||||
neoconf.setup()
|
||||
|
||||
local lsp_present, lspconfig = pcall(require, "lspconfig")
|
||||
local cmp_present, cmp = pcall(require, "cmp")
|
||||
local navic_present, navic = pcall(require, "nvim-navic")
|
||||
local luasnip_present, luasnip = pcall(require, "luasnip")
|
||||
local luasnip_present = pcall(require, "luasnip")
|
||||
|
||||
if not (cmp_present and lsp_present and luasnip_present and neoconf_present) then
|
||||
if not (cmp_present and lsp_present and luasnip_present) then
|
||||
vim.notify("lsp, cmp, luasnip not present", vim.log.levels.ERROR)
|
||||
return
|
||||
end
|
||||
|
@ -33,20 +30,8 @@ local cmp_borders = {
|
|||
winhighlight = "Normal:CmpPmenu,FloatBorder:CmpBorder,CursorLine:PmenuSel,Search:None",
|
||||
}
|
||||
|
||||
-- stylua: ignore
|
||||
local has_words_before = function()
|
||||
---@diagnostic disable-next-line: deprecated
|
||||
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
|
||||
|
||||
-- require("copilot_cmp").setup() -- setup copilot cmp
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
completion = cmp_borders,
|
||||
documentation = cmp_borders,
|
||||
|
@ -54,30 +39,8 @@ cmp.setup({
|
|||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
}, { "i", "s" }),
|
||||
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
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" }),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
-- { name = "copilot" },
|
||||
{ name = "nvim_lsp" },
|
||||
|
@ -151,20 +114,6 @@ require("isabel.lsp.nix").setup(common)
|
|||
require("isabel.lsp.validation").setup(common)
|
||||
require("isabel.lsp.webdev").setup(common)
|
||||
|
||||
pcall(require("rust-tools").setup, {
|
||||
server = {
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
cargo = {
|
||||
autoReload = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
tools = {
|
||||
executor = require("rust-tools.executors").toggleterm,
|
||||
},
|
||||
})
|
||||
pcall(require("py_lsp").setup, common)
|
||||
|
||||
local servers = {
|
||||
|
@ -178,6 +127,7 @@ local servers = {
|
|||
"taplo",
|
||||
"teal_ls",
|
||||
"marksman",
|
||||
"rust_analyzer",
|
||||
}
|
||||
|
||||
for _, server in ipairs(servers) do
|
||||
|
|
|
@ -31,9 +31,6 @@ null.setup({
|
|||
null.builtins.formatting.rustfmt,
|
||||
null.builtins.formatting.shfmt,
|
||||
null.builtins.formatting.stylua,
|
||||
null.builtins.formatting.swiftformat.with({
|
||||
command = "swift-format",
|
||||
}),
|
||||
null.builtins.formatting.taplo,
|
||||
null.builtins.diagnostics.statix,
|
||||
null.builtins.diagnostics.deadnix,
|
||||
|
|
|
@ -123,13 +123,6 @@ in rec {
|
|||
};
|
||||
};
|
||||
|
||||
# tabs
|
||||
# bufferline = {
|
||||
# src = srcs.bufferline;
|
||||
# config = ./bufferline.lua;
|
||||
# dependencies = {inherit catppuccin;};
|
||||
# };
|
||||
|
||||
# nicer notfications
|
||||
notify = {
|
||||
src = srcs.nvim-notify;
|
||||
|
@ -209,16 +202,7 @@ in rec {
|
|||
config = ./tree-sitter.lua;
|
||||
|
||||
dependencies = {
|
||||
nvim-treesitter-textobjects.src = srcs.nvim-treesitter-textobjects;
|
||||
rainbow-delimiters.src = srcs.rainbow-delimiters;
|
||||
|
||||
nvim-treesitter-context = {
|
||||
src = srcs.nvim-treesitter-context;
|
||||
config = {
|
||||
enable = false;
|
||||
mode = "topline";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -234,17 +218,13 @@ in rec {
|
|||
cmp-nvim-lsp.src = srcs.cmp-nvim-lsp;
|
||||
cmp-path.src = srcs.cmp-path;
|
||||
cmp_luasnip.src = srcs.cmp_luasnip;
|
||||
cmp-git.src = srcs.cmp-git;
|
||||
lspkind.src = srcs.lspkind;
|
||||
null-ls.src = srcs.null-ls;
|
||||
lsp-status.src = srcs.lsp-status;
|
||||
ltex-extra.src = srcs.ltex-extra;
|
||||
schemastore.src = srcs.schemastore;
|
||||
py_lsp.src = srcs.py_lsp;
|
||||
rust-tools.src = srcs.rust-tools;
|
||||
typescript-tools.src = srcs.typescript-tools;
|
||||
neorepl.src = srcs.neorepl;
|
||||
neoconf.src = srcs.neoconf;
|
||||
|
||||
luasnip = {
|
||||
src = srcs.luasnip;
|
||||
|
|
Loading…
Add table
Reference in a new issue