From e9a09d634b9c3a0bbf20684b472619b6a1e34a75 Mon Sep 17 00:00:00 2001 From: Brieuc Dubois Date: Sun, 31 Mar 2024 21:55:36 +0200 Subject: [PATCH] neovim config update & hypr screenshot --- .../.config/coc/extensions/package.json | 3 +- root/home/bhasher/.config/hypr/src/binds.conf | 2 +- root/home/bhasher/.config/nvim/init.lua | 50 +++++++++++++------ 3 files changed, 38 insertions(+), 17 deletions(-) diff --git a/root/home/bhasher/.config/coc/extensions/package.json b/root/home/bhasher/.config/coc/extensions/package.json index d6149fd..1556db6 100644 --- a/root/home/bhasher/.config/coc/extensions/package.json +++ b/root/home/bhasher/.config/coc/extensions/package.json @@ -1,6 +1,7 @@ { "dependencies": { "coc-json": ">=1.9.2", - "coc-tsserver": ">=2.1.4" + "coc-tsserver": ">=2.1.4", + "coc-sqlfluff": ">=0.11.4" } } \ No newline at end of file diff --git a/root/home/bhasher/.config/hypr/src/binds.conf b/root/home/bhasher/.config/hypr/src/binds.conf index c003e0c..f0bab88 100644 --- a/root/home/bhasher/.config/hypr/src/binds.conf +++ b/root/home/bhasher/.config/hypr/src/binds.conf @@ -63,7 +63,7 @@ bindle = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5% bindle = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5% bindl = , XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle bindl = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle -bind = , PRINT, exec, hyprshot -m region +bind = , PRINT, exec, hyprshot -m region --clipboard-only bind = , XF86MonBrightnessUp, exec, brightnessctl set +5% bind = , XF86MonBrightnessDown, exec, brightnessctl set 5%- diff --git a/root/home/bhasher/.config/nvim/init.lua b/root/home/bhasher/.config/nvim/init.lua index b27f0d9..a9c6212 100644 --- a/root/home/bhasher/.config/nvim/init.lua +++ b/root/home/bhasher/.config/nvim/init.lua @@ -23,7 +23,7 @@ vim.opt.swapfile = false vim.opt.mouse = "a" vim.opt.spell = true -vim.opt.spelllang = "en" -- ,fr' +vim.opt.spelllang = "en,fr" vim.api.nvim_set_hl(0, "SpellBad", { ctermbg = 238 }) vim.cmd([[colorscheme desert]]) @@ -59,13 +59,6 @@ require("lazy").setup({ { -- Copilot "github/copilot.vim", - --config = function() - -- require("copilot.vim").setup({ - -- filetypes = { - -- ["."] = true, - -- } - -- }) - -- end, }, { -- Ranger file explorer @@ -83,9 +76,14 @@ require("lazy").setup({ -- Auto pairs "altermo/ultimate-autopair.nvim", event = { "InsertEnter", "CmdlineEnter" }, - branch = "v0.6", --recommended as each new version will have breaking changes + branch = "v0.6", opts = {}, }, + { + -- Fuzzy finder + "nvim-telescope/telescope.nvim", + dependencies = { "nvim-lua/plenary.nvim" }, + }, }) require("conform").setup({ @@ -104,12 +102,31 @@ require("conform").setup({ yaml = { "prettier" }, toml = { "prettier" }, java = { "google-java-format" }, + c = { "clang-format" }, + cpp = { "clang-format" }, + h = { "clang-format" }, }, format_on_save = {}, }) require("nvim-treesitter.configs").setup({ - ensure_installed = { "go", "lua", "vim", "vimdoc", "sql", "json", "javascript", "typescript", "svelte", "html", "java", "markdown" }, + ensure_installed = { + "go", + "lua", + "vim", + "vimdoc", + "sql", + "json", + "javascript", + "typescript", + "svelte", + "html", + "java", + "markdown", + "yaml", + "c", + "cpp", + }, highlight = { enable = true, }, @@ -118,15 +135,20 @@ require("nvim-treesitter.configs").setup({ }, }) - -- mappings vim.keymap.set("i", "", "(copilot-accept-word)") + vim.keymap.set( "i", - "", - "coc#pum#visible() ? coc#pum#next(1): ''", + "", + "coc#pum#visible() ? coc#pum#confirm(): ''", { noremap = true, silent = true, expr = true } ) +vim.keymap.set("i", "", "coc#refresh()", { noremap = true, silent = true, expr = true }) + +vim.keymap.set("v", "", '"+y', { noremap = true, silent = true }) + +vim.keymap.set("n", "ff", require("telescope.builtin").find_files, {}) -- commands vim.api.nvim_create_user_command("Day", function(opts) @@ -136,5 +158,3 @@ end, { nargs = 0 }) vim.api.nvim_create_user_command("Night", function(opts) vim.cmd([[colorscheme desert]]) end, { nargs = 0 }) - --- Abc