diff --git a/.gitignore b/.gitignore index 1d1d495..58c3ed1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ nvim-pack-lock.json +.luarc.json diff --git a/.luarc.json b/.luarc.json deleted file mode 100644 index 8de7cb2..0000000 --- a/.luarc.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "diagnostics.globals": [ - "vim", - "Snacks", - "MiniStatusline" - ] -} diff --git a/init.lua b/init.lua index e4d8715..1477173 100644 --- a/init.lua +++ b/init.lua @@ -1,9 +1,21 @@ +-- general options local opt = vim.opt +vim.g.mapleader = " " +vim.g.maplocalleader = "\\" +opt.number = true opt.relativenumber = true + +opt.cursorline = false +opt.termguicolors = true +opt.winborder = "rounded" +opt.signcolumn = "yes" vim.lsp.inlay_hint.enable = true opt.tabstop = 8 vim.opt.expandtab = true +vim.g.tinted_background_transparent = 1 opt.swapfile = false +opt.winborder = "single" + opt.shiftwidth = 8 vim.diagnostic.config({ virtual_text = { @@ -13,31 +25,65 @@ vim.diagnostic.config({ }) -- add plugins vim.pack.add({ - "https://github.com/nvim-treesitter/nvim-treesitter", + "https://github.com/folke/snacks.nvim", "https://github.com/nvim-lualine/lualine.nvim", - "https://github.com/RRethy/base16-nvim", - "https://github.com/tinted-theming/tinted-nvim.git", + "https://github.com/tinted-theming/tinted-vim", + "https://github.com/nvimdev/lspsaga.nvim", "https://github.com/neovim/nvim-lspconfig", + "https://github.com/nvim-treesitter/nvim-treesitter", "https://github.com/vyfor/cord.nvim", - "https://github.com/nvim-mini/mini.nvim" + "https://github.com/mason-org/mason-lspconfig.nvim.git", + "https://github.com/mason-org/mason.nvim.git", + "https://github.com/Saghen/blink.cmp", + "https://github.com/saghen/blink.lib", }) -- function to set colorsceme -require('tinted-nvim').setup({ - ui = { - transparent = false - }, - highlights = { - integrations = { - lualine = true - } - } -}) vim.cmd("colorscheme " .. vim.fn.system("cat /home/lucy/.local/share/tinted-theming/tinty/current_scheme")) --- setup mini -require('mini.basics').setup() -require('mini.icons').setup() -require('mini.pick').setup() -require('mini.git').setup() +-- setup superior (?) lsp +vim.lsp.config("qml-language-server", { + cmd = { "qml-language-server" }, + filetypes = { "qml" }, + root_markers = { { "qmldir", "shell.qml" }, ".git" }, +}) + +vim.lsp.enable("qml-language-server") +vim.lsp.enable("clangd") +require("blink.cmp").setup({ + fuzzy = { implementation = "prefer_rust_with_warning" }, + completion = { + menu = { + auto_show = false, + }, + }, + sources = { + default = { "lsp", "path", "snippets", "buffer" }, + }, +}) +require("mason").setup() +require("mason-lspconfig").setup() +require("snacks").setup({ + notifier = { enabled = true }, + statuscolumn = { enabled = true }, + picker = {}, +}) +require("lspsaga").setup({ + symbol_in_winbar = { enable = true }, + lightbulb = { + enable = true, + sign = false, + }, + hover = { + max_width = 0.6, + open_link = "gx", + open_browser = "!google-chrome", + }, +}) +require("cord").setup({ + display = { + theme = "atom", + }, + editor = { tooltip = "ur gay x3" }, +}) require("lualine").setup({ options = { section_separators = { left = "", right = "" }, @@ -63,33 +109,15 @@ require("lualine").setup({ } }) --- setup superior lsp -vim.lsp.config("qml-language-server", { - cmd = { "qml-language-server" }, - filetypes = { "qml" }, - root_markers = { { "qmldir", "shell.qml" }, ".git" }, -}) -vim.lsp.enable("lua_ls") - -vim.lsp.enable("qml-language-server") -vim.lsp.enable("clangd") -vim.lsp.enable("lua-language-server") -require("cord").setup({ - display = { - theme = "atom", - }, - editor = { tooltip = "ur gay x3" }, -}) - -- keymaps local map = vim.keymap.set map("n", "ff", function() - MiniPick.builtin.files() + Snacks.picker.files() end) map("n", "lg", function() - MiniPick.builtin.grep_live() + Snacks.picker.grep() end) map("n", "", "h") @@ -101,12 +129,29 @@ map("n", "", ":vertical resize +5", { silent = true }) map("n", "", ":resize +5", { silent = true }) map("n", "", ":resize -5", { silent = true }) -- lsp keybinds +map("n", "K", " Lspsaga hover_doc") +map("n", "go", " Lspsaga goto_definition") +map("n", "gr", " Lspsaga finder") +map("n", "qf", " Lspsaga code_action") map("n", "", function() vim.lsp.buf.format() end) +-- buffer keybinds +map("n", "", " LualineBuffersJump! 1 ") +map("n", "", " LualineBuffersJump! 2 ") +map("n", "", " LualineBuffersJump! 3 ") +map("n", "", " LualineBuffersJump! 4 ") +map("n", "", " LualineBuffersJump! 5 ") +map("n", "", " LualineBuffersJump! 6 ") +map("n", "", " LualineBuffersJump! 7 ") +map("n", "", " LualineBuffersJump! 8 ") +map("n", "", " LualineBuffersJump! 9 ") +map("n", "", " LualineBuffersJump! last ") +map("n", "w", " bdelete! ") -- util keybinds map("n", "t", " terminal ") map("n", "", "Lspsaga term_toggle") map("t", "", "") -map("i", "", "") +map("i", "", vim.lsp.completion.get, { desc = "trigger autocompletion" }) +