Compare commits

..

No commits in common. "main" and "main" have entirely different histories.
main ... main

17 changed files with 99 additions and 68 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
.luarc.json
*.sug

View file

@ -1,6 +1,5 @@
require("config.settings")
require("config.lazy")
require("config.lsp")
require("config.mappings")
vim.cmd.colorscheme("tokyonight")

View file

@ -1,16 +1,25 @@
{
"LuaSnip": { "branch": "master", "commit": "faf3c94a44508cec1b961406d36cc65113ff3b98" },
"blink.cmp": { "branch": "main", "commit": "022521a8910a5543b0251b21c9e1a1e989745796" },
"LuaSnip": { "branch": "master", "commit": "c1851d5c519611dfc451b6582961b2602e0af89b" },
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
"cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" },
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lualine.nvim": { "branch": "master", "commit": "0c6cca9f2c63dadeb9225c45bc92bb95a151d4af" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "3856bbb0da214d1f2f3d5a2dd3fea26591f930f9" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "ce0e87c0be12e7c48296a7513e90430e3eac7f24" },
"mason.nvim": { "branch": "main", "commit": "9eaedb864cdadc29c6eb7d761a6c0d8aee26c91b" },
"moonfly": { "branch": "master", "commit": "e356d55cedb24a6c4251d83ce28e0e2010e99d2f" },
"neo-tree.nvim": { "branch": "main", "commit": "56f383aa157f1ff20a59154907cc5f9fe26e4db9" },
"nui.nvim": { "branch": "main", "commit": "f535005e6ad1016383f24e39559833759453564e" },
"nvim-autopairs": { "branch": "master", "commit": "4d74e75913832866aa7de35e4202463ddf6efd1b" },
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
"nvim-lspconfig": { "branch": "master", "commit": "f610208989e9c03561f9f601db3133f6ae398fcd" },
"nvim-lspconfig": { "branch": "master", "commit": "ac1dfbe3b60e5e23a2cff90e3bd6a3bc88031a57" },
"nvim-treesitter": { "branch": "master", "commit": "066fd6505377e3fd4aa219e61ce94c2b8bdb0b79" },
"nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" },
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
@ -18,6 +27,5 @@
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
"typst-preview.nvim": { "branch": "master", "commit": "dea4525d5420b7c32eebda7de15a6beb9d6574fa" }
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" }
}

View file

@ -1,6 +0,0 @@
---@type vim.lsp.Config
return {
cmd = { "/usr/bin/clangd" },
filetypes = { "c", "cpp", "h", "hpp" },
root_markers = { { "makefile", "Makefile" }, ".git" },
}

View file

@ -1,10 +0,0 @@
---@type vim.lsp.Config
return {
cmd = { "/usr/bin/tinymist" },
filetypes = { "typst" },
settings = {
formatterMode = "typstyle",
exportPdf = "onType",
semanticTokens = "disable"
}
}

View file

@ -27,6 +27,6 @@ require("lazy").setup({
-- import your plugins
{ import = "plugins" },
},
install = { colorscheme = { "tokyonight" } },
checker = { enabled = false },
install = { colorscheme = { "pywal16" } },
checker = { enabled = true },
})

View file

@ -1,13 +0,0 @@
local capabilities = {
textDocument = {
foldingRange = {
dynamicRegistration = false,
lineFoldingOnly = true,
},
},
}
capabilities = require("blink.cmp").get_lsp_capabilities(capabilities)
-- Load all LSP's in "lsp/"
vim.lsp.enable({ "clangd", "tinymist", "lua-language-server", })

View file

@ -13,7 +13,6 @@ map("n", "<C-b>", "<cmd>Neotree toggle<CR>", { desc = "Open neotree"})
map("n", "<C-p>", "<cmd>Telescope find_files<CR>", { desc = "Telescope: Find files" })
map("n", "<C-g>", "<cmd>Telescope live_grep<CR>", { desc = "Telescope: Live grep" })
-- LSP Stuff
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
callback = function(ev)

View file

@ -0,0 +1,33 @@
local cmp = require'cmp'
require("luasnip.loaders.from_vscode").lazy_load()
cmp.setup({
snippet = {
expand = function(args)
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
end,
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
mapping = cmp.mapping.preset.insert({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
}),
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'luasnip' }, -- For luasnip users.
{ name = 'nvim_lua' },
-- { name = 'buffer' },
{ name = 'path' },
{ name = 'nvim_lsp_signature_help' },
-- { name = 'cmdline' },
})
})

View file

@ -16,7 +16,6 @@ o.tabstop = 2
o.softtabstop = 2
o.number = true
o.relativenumber = true
o.syntax = "on"
o.cursorline = true
o.expandtab = true

View file

@ -7,5 +7,11 @@ return {
disable_filetype = { "TelescopePrompt", "vim" },
map_cr = true,
},
config = function(opts)
require("nvim-autopairs").setup(opts)
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
local cmp = require('cmp')
require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done())
end
}
}

View file

@ -1,23 +0,0 @@
return {
{
"saghen/blink.cmp",
dependencies = {
"L3MON4D3/LuaSnip"
},
version = "1.*",
---@module "blink.cmp"
---@type blink.cmp.Config
opts = {
keymap = { preset = "super-tab" },
appearance = {
nerd_font_variant = "mono"
},
completion = { documentation = { auto_show = false } },
sources = {
default = { "lsp", "path", "snippets", "buffer" },
},
fuzzy = { implementation = "prefer_rust_with_warning" }
},
opts_extend = { "sources.default" }
}
}

31
lua/plugins/cmp.lua Normal file
View file

@ -0,0 +1,31 @@
return {
{
"hrsh7th/nvim-cmp",
dependencies = {
{ "hrsh7th/cmp-nvim-lua" },
{ "hrsh7th/cmp-nvim-lsp-signature-help" },
{ "hrsh7th/cmp-cmdline" },
{ "hrsh7th/cmp-path" },
{ "hrsh7th/cmp-buffer" },
},
opts = function()
require "config.plugins.cmp"
end,
},
{
"hrsh7th/cmp-nvim-lsp",
dependencies = {},
config = function()
local lspconfig = require('lspconfig')
local capabilities = require('cmp_nvim_lsp').default_capabilities()
end,
},
{
"L3MON4D3/LuaSnip",
dependencies = {
"saadparwaiz1/cmp_luasnip",
"rafamadriz/friendly-snippets"
},
opts = {}
}
}

View file

@ -0,0 +1,9 @@
return {
{
"neovim/nvim-lspconfig",
dependencies= {},
config = function()
local lspconfig = require("lspconfig")
end,
},
}

View file

@ -14,11 +14,9 @@ return {
{
"mason-org/mason-lspconfig.nvim",
dependencies = {
"mason-org/mason.nvim",
"neovim/nvim-lspconfig",
},
opts = {
ensure_installed = { "lua_ls" },
automatic_enable = true
},
},

View file

@ -7,7 +7,7 @@ return {
dependencies = {},
opts = {
auto_install = true,
ensure_installed = { "lua", "c", "vimdoc" },
ensure_installed = { "lua" },
highlight = { enable = true },
indent = { enable = true }
}

View file

@ -9,7 +9,7 @@ return {
opts = {
options = {
icons_enabled = true,
theme = 'tokyonight',
theme = 'pywal16-nvim',
component_separators = { left = "|", right = "|" },
section_separators = { left = "", right = "" },
},
@ -24,7 +24,7 @@ return {
mode = "buffers",
diagnostics = "nvim_lsp",
offsets = {
{
{
filetype = "neo-tree", text = "File Explorer",
text_align = "center", separator = true
}