neovim config update & hypr screenshot

This commit is contained in:
Brieuc Dubois 2024-03-31 21:55:36 +02:00
parent 0cc4ce2e14
commit e9a09d634b
3 changed files with 38 additions and 17 deletions

View File

@ -1,6 +1,7 @@
{ {
"dependencies": { "dependencies": {
"coc-json": ">=1.9.2", "coc-json": ">=1.9.2",
"coc-tsserver": ">=2.1.4" "coc-tsserver": ">=2.1.4",
"coc-sqlfluff": ">=0.11.4"
} }
} }

View File

@ -63,7 +63,7 @@ bindle = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5%
bindle = , XF86AudioLowerVolume, 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 = , XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle
bindl = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ 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 = , XF86MonBrightnessUp, exec, brightnessctl set +5%
bind = , XF86MonBrightnessDown, exec, brightnessctl set 5%- bind = , XF86MonBrightnessDown, exec, brightnessctl set 5%-

View File

@ -23,7 +23,7 @@ vim.opt.swapfile = false
vim.opt.mouse = "a" vim.opt.mouse = "a"
vim.opt.spell = true vim.opt.spell = true
vim.opt.spelllang = "en" -- ,fr' vim.opt.spelllang = "en,fr"
vim.api.nvim_set_hl(0, "SpellBad", { ctermbg = 238 }) vim.api.nvim_set_hl(0, "SpellBad", { ctermbg = 238 })
vim.cmd([[colorscheme desert]]) vim.cmd([[colorscheme desert]])
@ -59,13 +59,6 @@ require("lazy").setup({
{ {
-- Copilot -- Copilot
"github/copilot.vim", "github/copilot.vim",
--config = function()
-- require("copilot.vim").setup({
-- filetypes = {
-- ["."] = true,
-- }
-- })
-- end,
}, },
{ {
-- Ranger file explorer -- Ranger file explorer
@ -83,9 +76,14 @@ require("lazy").setup({
-- Auto pairs -- Auto pairs
"altermo/ultimate-autopair.nvim", "altermo/ultimate-autopair.nvim",
event = { "InsertEnter", "CmdlineEnter" }, event = { "InsertEnter", "CmdlineEnter" },
branch = "v0.6", --recommended as each new version will have breaking changes branch = "v0.6",
opts = {}, opts = {},
}, },
{
-- Fuzzy finder
"nvim-telescope/telescope.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
},
}) })
require("conform").setup({ require("conform").setup({
@ -104,12 +102,31 @@ require("conform").setup({
yaml = { "prettier" }, yaml = { "prettier" },
toml = { "prettier" }, toml = { "prettier" },
java = { "google-java-format" }, java = { "google-java-format" },
c = { "clang-format" },
cpp = { "clang-format" },
h = { "clang-format" },
}, },
format_on_save = {}, format_on_save = {},
}) })
require("nvim-treesitter.configs").setup({ 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 = { highlight = {
enable = true, enable = true,
}, },
@ -118,15 +135,20 @@ require("nvim-treesitter.configs").setup({
}, },
}) })
-- mappings -- mappings
vim.keymap.set("i", "<C-Right>", "<Plug>(copilot-accept-word)") vim.keymap.set("i", "<C-Right>", "<Plug>(copilot-accept-word)")
vim.keymap.set( vim.keymap.set(
"i", "i",
"<CR>", "<S-CR>",
"coc#pum#visible() ? coc#pum#next(1): '<CR>'", "coc#pum#visible() ? coc#pum#confirm(): '<S-CR>'",
{ noremap = true, silent = true, expr = true } { noremap = true, silent = true, expr = true }
) )
vim.keymap.set("i", "<C-Space>", "coc#refresh()", { noremap = true, silent = true, expr = true })
vim.keymap.set("v", "<C-A-c>", '"+y', { noremap = true, silent = true })
vim.keymap.set("n", "ff", require("telescope.builtin").find_files, {})
-- commands -- commands
vim.api.nvim_create_user_command("Day", function(opts) 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.api.nvim_create_user_command("Night", function(opts)
vim.cmd([[colorscheme desert]]) vim.cmd([[colorscheme desert]])
end, { nargs = 0 }) end, { nargs = 0 })
-- Abc