diff options
| -rw-r--r-- | nvim/.config/nvim/lazy-lock.json | 22 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/core/keymaps.lua | 4 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/plugins/appearance.lua | 2 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/plugins/everforest.lua | 22 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/plugins/lspconfig.lua | 58 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/plugins/rust.lua | 30 | ||||
| -rw-r--r-- | waybar/.config/waybar/config | 4 |
7 files changed, 118 insertions, 24 deletions
diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index f55b15f..8d5c0d1 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -7,19 +7,21 @@ "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "everforest-nvim": { "branch": "main", "commit": "eedb19079c6bf9d162f74a5c48a6d2759f38cc76" }, + "everforest-nvim": { "branch": "main", "commit": "5e0e32a569fb464911342f0d421721cc1c94cf25" }, "friendly-snippets": { "branch": "main", "commit": "dcd4a586439a1c81357d5b9d26319ae218cc9479" }, "indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" }, - "lazy.nvim": { "branch": "main", "commit": "83493db50a434a4c5c648faf41e2ead80f96e478" }, - "lazygit.nvim": { "branch": "main", "commit": "774dcecbd0b9b57be6c150adacb60ced79b11b23" }, + "lazy.nvim": { "branch": "main", "commit": "e888d5b64c34bc41f7ef2e8850a5e67e4b3e2731" }, + "lazygit.nvim": { "branch": "main", "commit": "0ada6c6e7e138df92f5009b6952f4ac41248305a" }, "lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, - "lualine.nvim": { "branch": "master", "commit": "af4c3cf17206810880d2a93562e0a4c0d901c684" }, - "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, + "lspsaga.nvim": { "branch": "main", "commit": "d5aa1a02a23b5725054928426b1de6932a6d3bc3" }, + "lualine.nvim": { "branch": "master", "commit": "b5e8bb642138f787a2c1c5aedc2a78cb2cebbd67" }, + "nvim-cmp": { "branch": "main", "commit": "97dc716fc914c46577a4f254035ebef1aa72558a" }, "nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" }, - "nvim-lspconfig": { "branch": "master", "commit": "4bdd3800b4148f670c6cf55ef65f490148eeb550" }, - "nvim-tree.lua": { "branch": "master", "commit": "f7c09bd72e50e1795bd3afb9e2a2b157b4bfb3c3" }, - "nvim-treesitter": { "branch": "master", "commit": "f87882858438834d2fbb6379aa2be37de901751b" }, - "nvim-web-devicons": { "branch": "master", "commit": "a851380fbea4c1312d11f13d5cdc86a7a19808dd" }, - "plenary.nvim": { "branch": "master", "commit": "f7adfc4b3f4f91aab6caebf42b3682945fbc35be" }, + "nvim-lspconfig": { "branch": "master", "commit": "6e5c78ebc9936ca74add66bda22c566f951b6ee5" }, + "nvim-tree.lua": { "branch": "master", "commit": "e508bdc4184c33c6d9705c503cf7f0e029601788" }, + "nvim-treesitter": { "branch": "master", "commit": "aa8d8bc600e00f84d11b9d40c6900d72d0f68fa3" }, + "nvim-web-devicons": { "branch": "master", "commit": "3ee60deaa539360518eaab93a6c701fe9f4d82ef" }, + "plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" }, + "rust-tools.nvim": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" }, "telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" } } \ No newline at end of file diff --git a/nvim/.config/nvim/lua/core/keymaps.lua b/nvim/.config/nvim/lua/core/keymaps.lua index 0ea6274..3c384d9 100644 --- a/nvim/.config/nvim/lua/core/keymaps.lua +++ b/nvim/.config/nvim/lua/core/keymaps.lua @@ -8,3 +8,7 @@ vim.keymap.set('n', '<leader>ff', ':Telescope find_files theme=dropdown<CR>', {} vim.keymap.set('n', '<leader>lg', ':LazyGit<CR>', {}) vim.keymap.set('n', '<C-n>', ':NvimTreeToggle<CR>', {}) + +vim.keymap.set('n', '<C-x>', ':bd<CR>', {}) +vim.keymap.set('n', '<C-j>', ':bp<CR>', {}) +vim.keymap.set('n', '<C-k>', ':bn<CR>', {}) diff --git a/nvim/.config/nvim/lua/plugins/appearance.lua b/nvim/.config/nvim/lua/plugins/appearance.lua index 24012be..8759b23 100644 --- a/nvim/.config/nvim/lua/plugins/appearance.lua +++ b/nvim/.config/nvim/lua/plugins/appearance.lua @@ -5,7 +5,7 @@ return { build = ":TSUpdate", config = function () require("nvim-treesitter.configs").setup({ - ensure_installed = { "c", "lua", "vim" }, + ensure_installed = { "c", "lua", "vim", "rust", "toml" }, sync_install = false, highlight = { enable = true }, indent = { enable = true }, diff --git a/nvim/.config/nvim/lua/plugins/everforest.lua b/nvim/.config/nvim/lua/plugins/everforest.lua index 9b0b58a..e00d8c9 100644 --- a/nvim/.config/nvim/lua/plugins/everforest.lua +++ b/nvim/.config/nvim/lua/plugins/everforest.lua @@ -1,12 +1,22 @@ return { { - "neanias/everforest-nvim", - lazy = false, -- load during startup - priority = 1000, -- load before all the other start plugins - config = function() - vim.cmd([[colorscheme everforest]]) -- set colortheme - end, + "neanias/everforest-nvim", + lazy = false, -- load during startup + priority = 1000, -- load before all the other start plugins + config = function() + local everforest = require("everforest") + everforest.setup({ + background = "medium", + transparent_background_level = 0, + italics = true, + disable_italic_comments = false, + on_highlights = function(hl, _) + hl["@string.special.symbol.ruby"] = { link = "@field" } + end, + }) + everforest.load() + end, } } diff --git a/nvim/.config/nvim/lua/plugins/lspconfig.lua b/nvim/.config/nvim/lua/plugins/lspconfig.lua index ce00009..94ca922 100644 --- a/nvim/.config/nvim/lua/plugins/lspconfig.lua +++ b/nvim/.config/nvim/lua/plugins/lspconfig.lua @@ -27,14 +27,33 @@ return { { "neovim/nvim-lspconfig", config = function() - require'lspconfig'.lua_ls.setup{ + require'lspconfig'.lua_ls.setup{ capabilities = require('cmp_nvim_lsp').default_capabilities(), settings = { Lua = { diagnostics = { globals = { 'vim', 'c2' } } } } - } + } + + require'lspconfig'.clangd.setup{ + capabilities = require('cmp_nvim_lsp').default_capabilities(), + } + + vim.api.nvim_create_autocmd('LspAttach', { + group = vim.api.nvim_create_augroup('UserLspConfig', {}), + callback = function(ev) + -- Enable completion triggered by <c-x><c-o> + vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc' + + -- Buffer local mappings. + -- See `:help vim.lsp.*` for documentation on any of the below functions + local opts = { buffer = ev.buf } + vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) + vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) + vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts) + vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts) + vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, opts) + vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts) + end, + }) - require'lspconfig'.clangd.setup{ - capabilities = require('cmp_nvim_lsp').default_capabilities() - } end, }, @@ -51,6 +70,19 @@ return { }, config = function() + + local signs = { + Error = " ", + Warn = " ", + Hint = " ", + Info = " " + } + + for type, icon in pairs(signs) do + local hl = "DiagnosticSign" .. type + vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) + end + local cmp = require("cmp") local luasnip = require("luasnip") @@ -123,6 +155,11 @@ return { }), }, }) + + vim.cmd(':set winhighlight=' .. cmp.config.window.bordered().winhighlight) + vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { + border = border "CmpDocBorder", + }) end, }, @@ -133,4 +170,15 @@ return { end, }, + { + 'nvimdev/lspsaga.nvim', + config = function() + require('lspsaga').setup({}) + end, + dependencies = { + 'nvim-treesitter/nvim-treesitter', -- optional + 'nvim-tree/nvim-web-devicons', -- optional + } + }, + } diff --git a/nvim/.config/nvim/lua/plugins/rust.lua b/nvim/.config/nvim/lua/plugins/rust.lua new file mode 100644 index 0000000..812cd46 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/rust.lua @@ -0,0 +1,30 @@ +return { + { + "simrat39/rust-tools.nvim", + config = function () + require("rust-tools").setup({ + tools = { + hover_actions = { + winhighlight = "NormalCmpDoc", + border = { + { "╭", "CmpDocBorder" }, + { "─", "CmpDocBorder" }, + { "╮", "CmpDocBorder" }, + { "│", "CmpDocBorder" }, + { "╯", "CmpDocBorder" }, + { "─", "CmpDocBorder" }, + { "╰", "CmpDocBorder" }, + { "│", "CmpDocBorder" }, + }, + auto_focus = true, + }, + }, + server = { + on_attach = function(_, bufnr) + vim.keymap.set("n", "<C-space>", require("rust-tools").hover_actions.hover_actions, { buffer = bufnr }) + end, + }, + }) + end + } +} diff --git a/waybar/.config/waybar/config b/waybar/.config/waybar/config index d121f79..33e895f 100644 --- a/waybar/.config/waybar/config +++ b/waybar/.config/waybar/config @@ -121,8 +121,8 @@ "pulseaudio": { // "scroll-step": 1, // %, can be a float "format": "{icon} {volume}%", - "format-bluetooth": "{volume}% {icon}", - "format-bluetooth-muted": " {icon}", + "format-bluetooth": "{volume}% {icon} ", + "format-bluetooth-muted": " ", "format-muted": " ", "format-icons": { "headphone": "", |