wip
This commit is contained in:
@@ -5,8 +5,8 @@ local M = {}
|
||||
local highlights = require "custom.highlights"
|
||||
|
||||
M.ui = {
|
||||
theme = "tokyodark",
|
||||
theme_toggle = { "tokyodark", "one_light" },
|
||||
theme = "onedark",
|
||||
theme_toggle = { "onedark", "one_light" },
|
||||
|
||||
hl_override = highlights.override,
|
||||
hl_add = highlights.add,
|
||||
|
||||
@@ -5,7 +5,7 @@ local lspconfig = require("lspconfig")
|
||||
|
||||
-- if you just want default config for the servers then put them in a table
|
||||
local servers =
|
||||
{ "html", "cssls", "tsserver", "clangd", "docker_compose_language_service", "dockerls", "rust_analyzer", "pyright" }
|
||||
{ "html", "cssls", "tsserver", "clangd", "docker_compose_language_service", "dockerls", "rust_analyzer", "pyright", "grammarly" }
|
||||
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig[lsp].setup({
|
||||
|
||||
@@ -41,6 +41,7 @@ M.mason = {
|
||||
|
||||
"jedi_language_server",
|
||||
|
||||
|
||||
"docker_compose_language_service",
|
||||
"dockerls",
|
||||
},
|
||||
@@ -62,4 +63,58 @@ M.nvimtree = {
|
||||
},
|
||||
}
|
||||
|
||||
M.cmp = function (_, opts)
|
||||
local cmp = require "cmp"
|
||||
opts.experimental = {
|
||||
ghost_text = true,
|
||||
}
|
||||
opts.sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "nvim_lua" },
|
||||
{ name = "path" },
|
||||
{ name = "buffer", keyword_length = 5},
|
||||
})
|
||||
|
||||
opts.mapping = cmp.config.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(),
|
||||
["<C-y>"] = cmp.mapping.confirm {
|
||||
behavior = cmp.ConfirmBehavior.Insert,
|
||||
select = true,
|
||||
},
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif require("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, {
|
||||
"i",
|
||||
"s",
|
||||
}),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif require("luasnip").jumpable(-1) then
|
||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-jump-prev", true, true, true), "")
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, {
|
||||
"i",
|
||||
"s",
|
||||
}),
|
||||
}
|
||||
return opts
|
||||
end
|
||||
|
||||
|
||||
return M
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@ M.general = {
|
||||
n = {
|
||||
-- harpoon
|
||||
["H"] = {function() require("harpoon.ui").toggle_quick_menu() end, "Open Harpoon" },
|
||||
["<leader>a"] = {function() require("harpoon.mark").add_file() end, "Add file to Harpoon"},
|
||||
["<leader>s"] = {function() require("harpoon.ui").nav_file(1) end, "Switch to file 1"},
|
||||
["<leader>d"] = {function() require("harpoon.ui").nav_file(2) end, "Switch to file 2"},
|
||||
["<leader>f"] = {function() require("harpoon.ui").nav_file(3) end, "Switch to file 3"},
|
||||
["<leader>g"] = {function() require("harpoon.ui").nav_file(4) end, "Switch to file 4"},
|
||||
["<leader>ha"] = {function() require("harpoon.mark").add_file() end, "Add file to Harpoon"},
|
||||
["<leader>hs"] = {function() require("harpoon.ui").nav_file(1) end, "Switch to file 1"},
|
||||
["<leader>hd"] = {function() require("harpoon.ui").nav_file(2) end, "Switch to file 2"},
|
||||
["<leader>hf"] = {function() require("harpoon.ui").nav_file(3) end, "Switch to file 3"},
|
||||
["<leader>hg"] = {function() require("harpoon.ui").nav_file(4) end, "Switch to file 4"},
|
||||
|
||||
-- navigation
|
||||
["<C-d>"] = {"<C-d>zz", "1/2 page down"},
|
||||
@@ -17,7 +17,6 @@ M.general = {
|
||||
["n"] = {"nzz", "find next"},
|
||||
["N"] = {"Nzz", "find prev"},
|
||||
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
local overrides = require "custom.configs.overrides"
|
||||
|
||||
|
||||
---@type NvPluginSpec[]
|
||||
local plugins = {
|
||||
|
||||
-- Override plugin definition options
|
||||
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
opts = overrides.cmp
|
||||
},
|
||||
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
@@ -54,13 +60,24 @@ local plugins = {
|
||||
end,
|
||||
},
|
||||
|
||||
{ "nvim-treesitter/nvim-treesitter-context",
|
||||
lazy = false,
|
||||
},
|
||||
|
||||
{
|
||||
"theprimeagen/harpoon",
|
||||
},
|
||||
|
||||
{
|
||||
'simrat39/rust-tools.nvim'
|
||||
},
|
||||
{
|
||||
'simrat39/rust-tools.nvim'
|
||||
},
|
||||
|
||||
{
|
||||
"ellisonleao/glow.nvim",
|
||||
config = true,
|
||||
cmd = "Glow",
|
||||
event = 'BufEnter *.md',
|
||||
},
|
||||
|
||||
-- Disable nvchad plugins
|
||||
|
||||
@@ -69,7 +86,6 @@ local plugins = {
|
||||
lazy = false,
|
||||
},
|
||||
|
||||
|
||||
{ "NvChad/nvterm", enabled = false },
|
||||
|
||||
-- To make a plugin not be loaded
|
||||
|
||||
Reference in New Issue
Block a user