diff --git a/.luarc.json b/.luarc.json index efa9a93..8de7cb2 100644 --- a/.luarc.json +++ b/.luarc.json @@ -2,7 +2,6 @@ "diagnostics.globals": [ "vim", "Snacks", - "MiniStatusline", - "MiniPick" + "MiniStatusline" ] } diff --git a/init.lua b/init.lua deleted file mode 120000 index 88167d1..0000000 --- a/init.lua +++ /dev/null @@ -1 +0,0 @@ -../../dotfiles/nvim/.config/nvim/init.lua \ No newline at end of file diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..e4d8715 --- /dev/null +++ b/init.lua @@ -0,0 +1,112 @@ +local opt = vim.opt +opt.relativenumber = true +vim.lsp.inlay_hint.enable = true +opt.tabstop = 8 +vim.opt.expandtab = true +opt.swapfile = false +opt.shiftwidth = 8 +vim.diagnostic.config({ + virtual_text = { + spacing = 4, + source = true, + }, +}) +-- add plugins +vim.pack.add({ + "https://github.com/nvim-treesitter/nvim-treesitter", + "https://github.com/nvim-lualine/lualine.nvim", + "https://github.com/RRethy/base16-nvim", + "https://github.com/tinted-theming/tinted-nvim.git", + "https://github.com/neovim/nvim-lspconfig", + "https://github.com/vyfor/cord.nvim", + "https://github.com/nvim-mini/mini.nvim" +}) +-- 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() +require("lualine").setup({ + options = { + section_separators = { left = "", right = "" }, + component_separators = { left = "|", right = "|" }, + globalstatus = true, + always_divide_middle = true, + }, + sections = { + lualine_a = { "mode" }, + lualine_b = { "diagnostics" }, + lualine_c = { "filename", "filesize", }, + lualine_x = { "lsp_status", "filetype" }, + lualine_y = { "" }, + lualine_z = { "location" }, + }, + tabline = { + lualine_a = { { 'buffers', mode = 2, show_modified_status = true, } }, + lualine_b = { 'branch' }, + lualine_c = {}, + lualine_x = {}, + lualine_y = {}, + lualine_z = { 'tabs' } + } +}) + +-- 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() +end) +map("n", "lg", function() + MiniPick.builtin.grep_live() +end) + +map("n", "", "h") +map("n", "", "j") +map("n", "", "k") +map("n", "", "l") +map("n", "", ":vertical resize -5", { silent = true }) +map("n", "", ":vertical resize +5", { silent = true }) +map("n", "", ":resize +5", { silent = true }) +map("n", "", ":resize -5", { silent = true }) +-- lsp keybinds +map("n", "", function() + vim.lsp.buf.format() +end) + +-- util keybinds +map("n", "t", " terminal ") +map("n", "", "Lspsaga term_toggle") +map("t", "", "") +map("i", "", "")