diff --git a/install-nvim.sh b/install-nvim.sh new file mode 100644 index 0000000..cc8ed13 --- /dev/null +++ b/install-nvim.sh @@ -0,0 +1,7 @@ +sudo apt remove gettext-base -y +sudo apt install gettext -y +source ~/.bashrc +git clone https://github.com/neovim/neovim +cd neovim +make CMAKE_BUILD_TYPE=RelWithDebInfo && cd build && cpack -G DEB && sudo dpkg -i nvim-linux-x86_64.deb +cd ~/.dotfiles/ && sudo rm -rf neovim diff --git a/menus/.config/plasma-org.kde.plasma.desktop-appletsrc b/menus/.config/plasma-org.kde.plasma.desktop-appletsrc index 444d539..eeda80a 100644 --- a/menus/.config/plasma-org.kde.plasma.desktop-appletsrc +++ b/menus/.config/plasma-org.kde.plasma.desktop-appletsrc @@ -66,7 +66,7 @@ immutability=1 plugin=org.kde.plasma.icontasks [Containments][2][Applets][5][Configuration][General] -launchers=preferred://filemanager,file:///var/lib/flatpak/exports/share/applications/io.gitlab.librewolf-community.desktop,applications:org.kde.konsole.desktop,file:///var/lib/flatpak/exports/share/applications/im.riot.Riot.desktop,file:///var/lib/flatpak/exports/share/applications/com.slack.Slack.desktop,file:///home/kendall/.local/share/applications/steam.desktop,file:///var/lib/flatpak/exports/share/applications/org.darktable.Darktable.desktop,applications:unityhub.desktop +launchers=preferred://filemanager,file:///var/lib/flatpak/exports/share/applications/io.gitlab.librewolf-community.desktop,applications:org.kde.konsole.desktop,file:///var/lib/flatpak/exports/share/applications/im.riot.Riot.desktop,file:///usr/share/applications/steam.desktop,file:///var/lib/flatpak/exports/share/applications/org.darktable.Darktable.desktop [Containments][2][Applets][6] immutability=1 @@ -83,10 +83,10 @@ SystrayContainmentId=8 [Containments][2][General] AppletOrder=3;4;5;6;7;20 -[Containments][22] -ItemGeometries-2560x1440= +[Containments][27] +ItemGeometries-2048x1280= ItemGeometriesHorizontal= -activityId=0000c6ef-f88c-4926-8d1b-6b8bafd6386d +activityId=b11f6e63-e961-4984-9d43-b6776df8ab0b formfactor=0 immutability=1 lastScreen=0 @@ -94,18 +94,30 @@ location=0 plugin=org.kde.plasma.folder wallpaperplugin=org.kde.image -[Containments][22][ConfigDialog] +[Containments][27][ConfigDialog] DialogHeight=540 DialogWidth=720 -[Containments][22][General] -positions={"2560x1440":[]} +[Containments][27][General] +positions={"2048x1280":[]} -[Containments][22][Wallpaper][org.kde.image][General] -Image=/home/kendall/Pictures/Wallpapers/hologram_scheme_scifi_139294_2560x1440.jpg -PreviewImage=/home/kendall/Pictures/Wallpapers/hologram_scheme_scifi_139294_2560x1440.jpg +[Containments][27][Wallpaper][org.kde.image][General] +Image=/home/kendall/Pictures/Wallpapers/blue_yellow_lens.jpg +PreviewImage=/home/kendall/Pictures/Wallpapers/blue_yellow_lens.jpg SlidePaths=/usr/share/wallpapers/ +[Containments][31] +activityId=b11f6e63-e961-4984-9d43-b6776df8ab0b +formfactor=0 +immutability=1 +lastScreen=1 +location=0 +plugin=org.kde.plasma.folder +wallpaperplugin=org.kde.image + +[Containments][31][General] +positions={"1920x1080":[]} + [Containments][8] activityId= formfactor=2 @@ -182,7 +194,7 @@ immutability=1 plugin=org.kde.plasma.volume [Containments][8][Applets][19][Configuration] -PreloadWeight=100 +PreloadWeight=92 [Containments][8][Applets][19][Configuration][General] migrated=true @@ -208,7 +220,7 @@ immutability=1 plugin=org.kde.plasma.bluetooth [Containments][8][Applets][25][Configuration] -PreloadWeight=96 +PreloadWeight=84 [Containments][8][Applets][26] immutability=1 @@ -225,7 +237,7 @@ plugin=org.kde.plasma.mediacontroller PreloadWeight=0 [Containments][8][Applets][30][Configuration] -PreloadWeight=42 +PreloadWeight=0 [Containments][8][Applets][31][Configuration] PreloadWeight=42 diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 91d6915..4f2ef78 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -2,7 +2,6 @@ local g = vim.g local o = vim.o local keymap = vim.keymap.set local cmd = vim.cmd -local fn = vim.fn local api = vim.api -- Leader Key @@ -80,5 +79,25 @@ api.nvim_exec([[ autocmd FocusLost,WinLeave * if &modifiable | let w:save_cursor = getcurpos() | %s/\s\+$//e | call setpos('.', w:save_cursor) | endif ]], false) --- Lazy.nvim -require("plugins") +-- Plugins +vim.pack.add({ + "https://github.com/ellisonleao/gruvbox.nvim", + "https://github.com/windwp/nvim-autopairs", + "https://github.com/Pocco81/auto-save.nvim", + "https://github.com/lewis6991/gitsigns.nvim", + "https://github.com/lukas-reineke/indent-blankline.nvim", + "https://github.com/nvim-lua/plenary.nvim", -- Dependancy of Telescope + "https://github.com/nvim-telescope/telescope.nvim", + "https://github.com/nvim-tree/nvim-web-devicons", -- Dependancy of Nvim Tree + "https://github.com/nvim-tree/nvim-tree.lua", + "https://github.com/nvim-treesitter/nvim-treesitter", + "https://github.com/neovim/nvim-lspconfig", + "https://github.com/hrsh7th/nvim-cmp", + "https://github.com/hrsh7th/cmp-nvim-lsp", + "https://github.com/hrsh7th/cmp-buffer", + "https://github.com/williamboman/mason.nvim", + "https://github.com/williamboman/mason-lspconfig.nvim", +}) + +-- Plugin Configs +require('plugins'); diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json deleted file mode 100644 index 276cf69..0000000 --- a/nvim/.config/nvim/lazy-lock.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "LuaSnip": { "branch": "master", "commit": "66b5c2707e624dcd2cd3605676c64a2efe47e9d1" }, - "auto-save.nvim": { "branch": "main", "commit": "979b6c82f60cfa80f4cf437d77446d0ded0addf0" }, - "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" }, - "gitsigns.nvim": { "branch": "main", "commit": "0cb5a7753d3c4b8e9cfdc9d88d9110cb8d4b1544" }, - "gruvbox.nvim": { "branch": "main", "commit": "58a2cda2e953a99e2f87c12b7fb4602da4e0709c" }, - "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, - "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, - "lsp-zero.nvim": { "branch": "v3.x", "commit": "77550f2f6cbf0959ef1583d845661af075f3442b" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "a9c876d72d82b6640266f8b248ac05a63630b1d9" }, - "mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" }, - "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, - "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, - "nvim-lspconfig": { "branch": "master", "commit": "f6da6f19b7d83a5133745adc41042170bdff835a" }, - "nvim-tree.lua": { "branch": "master", "commit": "b0b49552c9462900a882fe772993b01d780445fe" }, - "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, - "nvim-web-devicons": { "branch": "master", "commit": "0422a19d9aa3aad2c7e5cca167e5407b13407a9d" }, - "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, - "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" } -} diff --git a/nvim/.config/nvim/lua/plugins/cmp.lua b/nvim/.config/nvim/lua/plugins/cmp.lua new file mode 100644 index 0000000..1da5f0b --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/cmp.lua @@ -0,0 +1,47 @@ +local cmp = require'cmp' + +cmp.setup({ + snippet = { + expand = function(args) + vim.snippet.expand(args.body) + end, + }, + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), + }, + mapping = { + [''] = function(fallback) + if cmp.visible() then + if not cmp.select_next_item() then + if vim.bo.buftype ~= 'prompt' and has_words_before() then + cmp.complete() + else + fallback() + end + end + else + return vim.cmd(">") + end + end, + + [''] = function(fallback) + if cmp.visible() then + if not cmp.select_prev_item() then + if vim.bo.buftype ~= 'prompt' and has_words_before() then + cmp.complete() + else + fallback() + end + end + else + return vim.cmd("<") + end + end, + [''] = cmp.mapping.confirm({ select = true }), + }, + sources = cmp.config.sources({ + { name = 'nvim_lsp' }, + { name = 'buffer' }, + }) +}) diff --git a/nvim/.config/nvim/lua/plugins/copilot.lua b/nvim/.config/nvim/lua/plugins/copilot.lua deleted file mode 100644 index e69de29..0000000 diff --git a/nvim/.config/nvim/lua/plugins/diagnostics.lua b/nvim/.config/nvim/lua/plugins/diagnostics.lua new file mode 100644 index 0000000..162b636 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/diagnostics.lua @@ -0,0 +1,34 @@ +local levels = vim.diagnostic.severity + +local opts = { + virtual_text = false, + float = { + border = "rounded", + }, + signs = { + text = { + [levels.ERROR] = '✘', + [levels.WARN] = '▲', + [levels.HINT] = '⚑', + [levels.INFO] = '»', + }, + }, +} + +local sign_define = function(name, text) + local hl = 'DiagnosticSign' .. name + vim.fn.sign_define(hl, { + texthl = hl, + text = text, + numhl = '' + }) +end + +if vim.fn.has('nvim-0.10') == 0 then + sign_define('Error', opts.signs.text[levels.ERROR]) + sign_define('Warn', opts.signs.text[levels.WARN]) + sign_define('Hint', opts.signs.text[levels.HINT]) + sign_define('Info', opts.signs.text[levels.INFO]) +end + +vim.diagnostic.config(opts) diff --git a/nvim/.config/nvim/lua/plugins/init.lua b/nvim/.config/nvim/lua/plugins/init.lua index a80b3f8..ffab896 100644 --- a/nvim/.config/nvim/lua/plugins/init.lua +++ b/nvim/.config/nvim/lua/plugins/init.lua @@ -1,68 +1,10 @@ -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not (vim.uv or vim.loop).fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) -end -vim.opt.rtp:prepend(lazypath) - --- Plugins -require("lazy").setup({ - { "windwp/nvim-autopairs" }, - { "Pocco81/auto-save.nvim" }, - { "ellisonleao/gruvbox.nvim" }, - { "lewis6991/gitsigns.nvim" }, - { "lukas-reineke/indent-blankline.nvim" }, - { - "VonHeikemen/lsp-zero.nvim", - branch = "v3.x", - dependencies = { - "williamboman/mason.nvim", - "williamboman/mason-lspconfig.nvim", - "neovim/nvim-lspconfig", - "hrsh7th/nvim-cmp", - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - "L3MON4D3/LuaSnip", - }, - }, - { - "nvim-telescope/telescope.nvim", - tag = "0.1.8", - dependencies = "nvim-lua/plenary.nvim", - }, - { - "nvim-tree/nvim-tree.lua", - dependencies = "nvim-tree/nvim-web-devicons", - }, - { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - }, - -- { - -- "github/copilot.vim", - -- config = function() - -- vim.g.copilot_no_tab_map = true - -- vim.api.nvim_set_keymap( - -- "i", - -- "", - -- 'copilot#Accept("")', - -- { silent = true, expr = true } - -- ) - -- end, - -- }, -}) - require('plugins.colorscheme') +require('plugins.diagnostics') require('plugins.gitsigns') require('plugins.indent-blankline') -require('plugins.lsp-zero') require('plugins.nvim-autopairs') require('plugins.nvim-tree') require('plugins.telescope') require('plugins.treesitter') +require('plugins.cmp') +require('plugins.mason') diff --git a/nvim/.config/nvim/lua/plugins/lsp-zero.lua b/nvim/.config/nvim/lua/plugins/lsp-zero.lua deleted file mode 100644 index 90c79e3..0000000 --- a/nvim/.config/nvim/lua/plugins/lsp-zero.lua +++ /dev/null @@ -1,62 +0,0 @@ -local lsp_zero = require('lsp-zero') -local cmp = require('cmp') -local cmp_action = lsp_zero.cmp_action() - --- LSP Zero -lsp_zero.on_attach(function(client, bufnr) - lsp_zero.default_keymaps({buffer = bufnr}) -end) - -lsp_zero.set_sign_icons({ - error = '✘', - warn = '▲', - hint = '⚑', - info = '»' -}) - --- CMP -cmp.setup({ - source = { - { name = 'nvim_lsp' }, - { name = 'buffer' }, - }, - window = { - completion = cmp.config.window.bordered(), - documentation = cmp.config.window.bordered(), - }, - preselect = 'item', - completion = { - completeopt = 'menu,menuone,noinsert' - }, - mapping = { - [''] = cmp_action.luasnip_supertab(), - [''] = cmp_action.luasnip_shift_supertab(), - [''] = cmp.mapping.confirm({select = true}), - } -}) - --- Mason -require('mason').setup({}) - -require('mason-lspconfig').setup({ - ensure_installed = { - 'lua_ls', - 'ts_ls', - 'html', - 'cssls', - 'jsonls', - 'emmet_ls', - }, - handlers = { - function(server_name) - require('lspconfig')[server_name].setup({}) - end, - }, -}) - --- Show line diagnostics automatically in hover window -vim.diagnostic.config({ - virtual_text = false, -}) - -vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]] diff --git a/nvim/.config/nvim/lua/plugins/mason.lua b/nvim/.config/nvim/lua/plugins/mason.lua new file mode 100644 index 0000000..b88f311 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/mason.lua @@ -0,0 +1,15 @@ +require('mason').setup({}) +require('mason-lspconfig').setup({ + ensure_installed = { + 'lua_ls', + 'ts_ls', + 'html', + 'cssls', + 'jsonls', + }, + handlers = { + function(server_name) + require('lspconfig')[server_name].setup({}) + end, + }, +})