Compare commits

..

2 Commits

3 changed files with 134 additions and 100 deletions
+5
View File
@@ -74,6 +74,11 @@ run = 'layout tiling'
if.app-id = 'eu.opencloud.desktop' if.app-id = 'eu.opencloud.desktop'
run = 'layout tiling' run = 'layout tiling'
[[on-window-detected]]
if.app-id = 'org.darktable'
if.window-title-regex-substring = 'preferences'
run = 'layout floating'
[mode.service.binding] [mode.service.binding]
u = ['reload-config', 'mode main'] u = ['reload-config', 'mode main']
+46 -9
View File
@@ -34,6 +34,7 @@ vim.opt.autoread = true -- Automati
vim.opt.swapfile = false -- Disable swap files vim.opt.swapfile = false -- Disable swap files
-- Formatting -- Formatting
vim.opt.formatoptions:remove("ro") -- Remove 'ro' from formatoptions vim.opt.formatoptions:remove("ro") -- Remove 'ro' from formatoptions
vim.opt.completeopt = { 'menuone', 'noinsert', 'popup', 'fuzzy' }
--Move lines --Move lines
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv") vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv") vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
@@ -82,8 +83,8 @@ vim.api.nvim_create_autocmd('PackChanged', {
}) })
vim.pack.add({ vim.pack.add({
'https://github.com/sainnhe/gruvbox-material', --'https://github.com/sainnhe/gruvbox-material',
'https://github.com/sainnhe/everforest', --'https://github.com/sainnhe/everforest',
'https://github.com/navarasu/onedark.nvim', 'https://github.com/navarasu/onedark.nvim',
{ src = 'https://github.com/echasnovski/mini.icons', version = vim.version.range('*') }, { src = 'https://github.com/echasnovski/mini.icons', version = vim.version.range('*') },
'https://github.com/folke/snacks.nvim', 'https://github.com/folke/snacks.nvim',
@@ -93,7 +94,6 @@ vim.pack.add({
{ src = 'https://github.com/echasnovski/mini.ai', version = vim.version.range('*') }, { src = 'https://github.com/echasnovski/mini.ai', version = vim.version.range('*') },
-- Adds S in regex to handle case conversion -- Adds S in regex to handle case conversion
'https://github.com/tpope/vim-abolish', 'https://github.com/tpope/vim-abolish',
'https://github.com/mbbill/undotree',
{ src = 'https://github.com/ThePrimeagen/harpoon', version = 'harpoon2' }, { src = 'https://github.com/ThePrimeagen/harpoon', version = 'harpoon2' },
'https://github.com/stevearc/oil.nvim', 'https://github.com/stevearc/oil.nvim',
'https://github.com/mrjones2014/smart-splits.nvim', 'https://github.com/mrjones2014/smart-splits.nvim',
@@ -105,6 +105,7 @@ vim.pack.add({
'https://github.com/smjonas/inc-rename.nvim', 'https://github.com/smjonas/inc-rename.nvim',
'https://github.com/williamboman/mason.nvim', 'https://github.com/williamboman/mason.nvim',
{ src = 'https://github.com/saghen/blink.cmp', version = vim.version.range('*') }, { src = 'https://github.com/saghen/blink.cmp', version = vim.version.range('*') },
{ src = 'https://github.com/saghen/blink.compat', version = vim.version.range('*') },
'https://github.com/rafamadriz/friendly-snippets', 'https://github.com/rafamadriz/friendly-snippets',
'https://github.com/stevearc/conform.nvim', 'https://github.com/stevearc/conform.nvim',
'https://github.com/mfussenegger/nvim-lint', 'https://github.com/mfussenegger/nvim-lint',
@@ -112,7 +113,7 @@ vim.pack.add({
'https://github.com/mfussenegger/nvim-dap', 'https://github.com/mfussenegger/nvim-dap',
'https://github.com/igorlfs/nvim-dap-view', 'https://github.com/igorlfs/nvim-dap-view',
'https://github.com/lervag/vimtex', 'https://github.com/lervag/vimtex',
{ src = 'https://github.com/chomosuke/typst-preview.nvim', version = vim.version.range('1.*') }, 'https://github.com/micangl/cmp-vimtex',
'https://github.com/tpope/vim-fugitive', 'https://github.com/tpope/vim-fugitive',
'https://github.com/FabijanZulj/blame.nvim', 'https://github.com/FabijanZulj/blame.nvim',
'https://github.com/folke/todo-comments.nvim', 'https://github.com/folke/todo-comments.nvim',
@@ -120,6 +121,11 @@ vim.pack.add({
'https://github.com/nvim-tree/nvim-web-devicons', 'https://github.com/nvim-tree/nvim-web-devicons',
}) })
-- NVIM 0.12 EXPERIMENTAL
vim.cmd.packadd('nvim.undotree')
vim.o.cmdheight=0
require('vim._core.ui2').enable()
local treesitter = require('nvim-treesitter') local treesitter = require('nvim-treesitter')
vim.api.nvim_create_autocmd('FileType', { vim.api.nvim_create_autocmd('FileType', {
callback = function(args) callback = function(args)
@@ -248,8 +254,24 @@ require('mason').setup()
vim.api.nvim_create_autocmd("LspAttach", { vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("UserLspConfig", {}), group = vim.api.nvim_create_augroup("UserLspConfig", {}),
callback = function(ev) callback = function(ev)
local conform = require("conform") -- local client = assert(vim.lsp.get_client_by_id(ev.data.client_id))
-- vim.lsp.completion.enable(true, client.id, ev.buf, {
-- autotrigger = true,
-- convert = function(item)
-- local kind_name = vim.lsp.protocol.CompletionItemKind[item.kind] or 'Text'
-- local icon, hl = require('mini.icons').get('lsp', kind_name:lower())
-- return {
-- abbr = (item.label or ''):gsub('%b()', ''),
-- kind = icon and (icon .. ' ' .. kind_name) or kind_name,
-- kind_hlgroup = hl,
-- menu = item.detail or '',
-- }
-- end,
-- })
-- vim.o.pumheight = 7
-- vim.o.pumborder = 'single'
local conform = require("conform")
local function jumpWithVirtLineDiags(jumpCount) local function jumpWithVirtLineDiags(jumpCount)
pcall(vim.api.nvim_del_augroup_by_name, "jumpWithVirtLineDiags") pcall(vim.api.nvim_del_augroup_by_name, "jumpWithVirtLineDiags")
vim.diagnostic.jump({ count = jumpCount }) vim.diagnostic.jump({ count = jumpCount })
@@ -269,7 +291,9 @@ vim.api.nvim_create_autocmd("LspAttach", {
end, 1) end, 1)
end end
vim.api.nvim_set_hl(0, 'Pmenu', { link = 'Float' })
local bufopts = { noremap = true, silent = true, buffer = ev.buf } local bufopts = { noremap = true, silent = true, buffer = ev.buf }
vim.keymap.set('i', '<C-Space>', vim.lsp.completion.get)
vim.keymap.set("n", "<space>e", vim.diagnostic.open_float, bufopts) vim.keymap.set("n", "<space>e", vim.diagnostic.open_float, bufopts)
vim.keymap.set("n", "<space>q", vim.diagnostic.setloclist, bufopts) vim.keymap.set("n", "<space>q", vim.diagnostic.setloclist, bufopts)
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, bufopts) vim.keymap.set("n", "gD", vim.lsp.buf.declaration, bufopts)
@@ -357,9 +381,14 @@ vim.lsp.enable('clangd')
vim.lsp.config['nil_ls'] = { capabilities = capabilities } vim.lsp.config['nil_ls'] = { capabilities = capabilities }
vim.lsp.enable('nil_ls') vim.lsp.enable('nil_ls')
vim.lsp.config['pyright'] = { capabilities = capabilities }
vim.lsp.enable('pyright')
-- vimtex -- -- vimtex --
if vim.loop.os_uname().sysname == "Darwin" then if vim.loop.os_uname().sysname == "Darwin" then
vim.g.vimtex_view_method = 'sioyek' vim.g.vimtex_view_method = 'skim'
-- vim.g.vimtex_view_method = 'zathura'
-- vim.g.vimtex_view_zathura_use_synctex = 0
else else
vim.g.vimtex_view_method = 'zathura' vim.g.vimtex_view_method = 'zathura'
end end
@@ -380,7 +409,8 @@ vim.g.vimtex_view_automatic = 1
-- blink.cmp -- -- blink.cmp --
require('blink.cmp').setup({ if vim.g.vscode ~= 1 then
require('blink.cmp').setup({
keymap = { keymap = {
preset = 'default', preset = 'default',
['<Up>'] = {}, ['<Up>'] = {},
@@ -393,13 +423,19 @@ require('blink.cmp').setup({
nerd_font_variant = 'mono', nerd_font_variant = 'mono',
}, },
sources = { sources = {
default = { 'lsp', 'path', 'snippets', 'buffer' }, default = { 'vimtex', 'lsp', 'path', 'snippets', 'buffer' },
providers = { providers = {
lazydev = { lazydev = {
name = "LazyDev", name = "LazyDev",
module = "lazydev.integrations.blink", module = "lazydev.integrations.blink",
fallbacks = { "lsp" }, fallbacks = { "lsp" },
}, },
vimtex = {
name = "vimtex",
min_keyword_length = 2,
module = "blink.compat.source",
score_offset = 80,
},
}, },
}, },
signature = { signature = {
@@ -444,7 +480,8 @@ require('blink.cmp').setup({
}, },
}, },
}, },
}) })
end
-- conform -- -- conform --
require('conform').setup({ require('conform').setup({
+28 -36
View File
@@ -5,30 +5,31 @@
"src": "https://github.com/FabijanZulj/blame.nvim" "src": "https://github.com/FabijanZulj/blame.nvim"
}, },
"blink.cmp": { "blink.cmp": {
"rev": "451168851e8e2466bc97ee3e026c3dcb9141ce07", "rev": "78336bc89ee5365633bcf754d93df01678b5c08f",
"src": "https://github.com/saghen/blink.cmp", "src": "https://github.com/saghen/blink.cmp",
"version": ">=0.0.0" "version": ">=0.0.0"
}, },
"conform.nvim": { "blink.compat": {
"rev": "086a40dc7ed8242c03be9f47fbcee68699cc2395", "rev": "2ed6d9a28b07fa6f3bface818470605f8896408c",
"src": "https://github.com/stevearc/conform.nvim" "src": "https://github.com/saghen/blink.compat",
"version": ">=0.0.0"
}, },
"everforest": { "cmp-vimtex": {
"rev": "b03a03148c8b34c24c96960b93da9c8883d11f54", "rev": "c09ca05bfa0641754516f13294d73d3799a02fc8",
"src": "https://github.com/sainnhe/everforest" "src": "https://github.com/micangl/cmp-vimtex"
},
"conform.nvim": {
"rev": "9fd3b3a91b0981d60d2bc688c8cd1680320ee5de",
"src": "https://github.com/stevearc/conform.nvim"
}, },
"friendly-snippets": { "friendly-snippets": {
"rev": "6cd7280adead7f586db6fccbd15d2cac7e2188b9", "rev": "6cd7280adead7f586db6fccbd15d2cac7e2188b9",
"src": "https://github.com/rafamadriz/friendly-snippets" "src": "https://github.com/rafamadriz/friendly-snippets"
}, },
"fzf-lua": { "fzf-lua": {
"rev": "6e41ba7505f35a6f054ca682b043aa0cea36c2ef", "rev": "23f71140754b9162551dc8ccc1d6346e4275ecc2",
"src": "https://github.com/ibhagwan/fzf-lua" "src": "https://github.com/ibhagwan/fzf-lua"
}, },
"gruvbox-material": {
"rev": "790afe9dd085aa04eccd1da3626c5fa05c620e53",
"src": "https://github.com/sainnhe/gruvbox-material"
},
"harpoon": { "harpoon": {
"rev": "87b1a3506211538f460786c23f98ec63ad9af4e5", "rev": "87b1a3506211538f460786c23f98ec63ad9af4e5",
"src": "https://github.com/ThePrimeagen/harpoon", "src": "https://github.com/ThePrimeagen/harpoon",
@@ -47,11 +48,11 @@
"src": "https://github.com/barreiroleo/ltex-extra.nvim" "src": "https://github.com/barreiroleo/ltex-extra.nvim"
}, },
"mason.nvim": { "mason.nvim": {
"rev": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65", "rev": "8e921c2b68571e978db5d4d3fef9c9a7f8755473",
"src": "https://github.com/williamboman/mason.nvim" "src": "https://github.com/williamboman/mason.nvim"
}, },
"mini.ai": { "mini.ai": {
"rev": "4b0a6207341d895b6cfe9bcb1e4d3e8607bfe4f4", "rev": "bfb26d9072670c3aaefab0f53024b2f3729c8083",
"src": "https://github.com/echasnovski/mini.ai", "src": "https://github.com/echasnovski/mini.ai",
"version": ">=0.0.0" "version": ">=0.0.0"
}, },
@@ -71,31 +72,31 @@
"version": ">=0.0.0" "version": ">=0.0.0"
}, },
"nvim-dap": { "nvim-dap": {
"rev": "a9d8cb68ee7184111dc66156c4a2ebabfbe01bc5", "rev": "45a69eba683a2c448dd9ecfc4de89511f0646b5f",
"src": "https://github.com/mfussenegger/nvim-dap" "src": "https://github.com/mfussenegger/nvim-dap"
}, },
"nvim-dap-view": { "nvim-dap-view": {
"rev": "1b538131335f807ab54baa2bc06b811d5dd75079", "rev": "b5cc6e1c4cd188478fdad2e0b58dbca08fd6d363",
"src": "https://github.com/igorlfs/nvim-dap-view" "src": "https://github.com/igorlfs/nvim-dap-view"
}, },
"nvim-lint": { "nvim-lint": {
"rev": "606b823a57b027502a9ae00978ebf4f5d5158098", "rev": "665525810630701b84181e4d9eefd24b49845b29",
"src": "https://github.com/mfussenegger/nvim-lint" "src": "https://github.com/mfussenegger/nvim-lint"
}, },
"nvim-lspconfig": { "nvim-lspconfig": {
"rev": "dd261ad5266ab5bbec249d21efeceda98ff3e1a6", "rev": "8f7e64066e2641d5e7d494962a9c7051e3d38dd5",
"src": "https://github.com/neovim/nvim-lspconfig" "src": "https://github.com/neovim/nvim-lspconfig"
}, },
"nvim-treesitter": { "nvim-treesitter": {
"rev": "2f5d4c3f3c675962242096bcc8e586d76dd72eb2", "rev": "4916d6592ede8c07973490d9322f187e07dfefac",
"src": "https://github.com/nvim-treesitter/nvim-treesitter" "src": "https://github.com/nvim-treesitter/nvim-treesitter"
}, },
"nvim-treesitter-textobjects": { "nvim-treesitter-textobjects": {
"rev": "4e91b5d0394329a229725b021a8ea217099826ef", "rev": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e",
"src": "https://github.com/nvim-treesitter/nvim-treesitter-textobjects" "src": "https://github.com/nvim-treesitter/nvim-treesitter-textobjects"
}, },
"nvim-web-devicons": { "nvim-web-devicons": {
"rev": "d7462543c9e366c0d196c7f67a945eaaf5d99414", "rev": "2795c26c916bb3c57dde308b82be51971fa92747",
"src": "https://github.com/nvim-tree/nvim-web-devicons" "src": "https://github.com/nvim-tree/nvim-web-devicons"
}, },
"oil.nvim": { "oil.nvim": {
@@ -103,38 +104,29 @@
"src": "https://github.com/stevearc/oil.nvim" "src": "https://github.com/stevearc/oil.nvim"
}, },
"onedark.nvim": { "onedark.nvim": {
"rev": "213c23ae45a04797572242568d5d51937181792d", "rev": "df4792accde9db0043121f32628bcf8e645d9aea",
"src": "https://github.com/navarasu/onedark.nvim" "src": "https://github.com/navarasu/onedark.nvim"
}, },
"plenary.nvim": { "plenary.nvim": {
"rev": "b9fd5226c2f76c951fc8ed5923d85e4de065e509", "rev": "74b06c6c75e4eeb3108ec01852001636d85a932b",
"src": "https://github.com/nvim-lua/plenary.nvim" "src": "https://github.com/nvim-lua/plenary.nvim"
}, },
"smart-splits.nvim": { "smart-splits.nvim": {
"rev": "82d01bb71bc051955654b3af68355f783d872fe0", "rev": "9053ebd394c38fe55fd2f4710daec27411c34fb9",
"src": "https://github.com/mrjones2014/smart-splits.nvim" "src": "https://github.com/mrjones2014/smart-splits.nvim"
}, },
"snacks.nvim": { "snacks.nvim": {
"rev": "a049339328e2599ad6e85a69fa034ac501e921b2", "rev": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e",
"src": "https://github.com/folke/snacks.nvim" "src": "https://github.com/folke/snacks.nvim"
}, },
"tiny-glimmer.nvim": { "tiny-glimmer.nvim": {
"rev": "932e6c2cc4a43ce578f007db1f8f61ad6798f938", "rev": "cc285167914e947fc130523d02927fdaf24636a6",
"src": "https://github.com/rachartier/tiny-glimmer.nvim" "src": "https://github.com/rachartier/tiny-glimmer.nvim"
}, },
"todo-comments.nvim": { "todo-comments.nvim": {
"rev": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668", "rev": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668",
"src": "https://github.com/folke/todo-comments.nvim" "src": "https://github.com/folke/todo-comments.nvim"
}, },
"typst-preview.nvim": {
"rev": "e123a7ab64e52d836e00dea9251e85b201f38966",
"src": "https://github.com/chomosuke/typst-preview.nvim",
"version": "1.0.0 - 2.0.0"
},
"undotree": {
"rev": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d",
"src": "https://github.com/mbbill/undotree"
},
"vim-abolish": { "vim-abolish": {
"rev": "dcbfe065297d31823561ba787f51056c147aa682", "rev": "dcbfe065297d31823561ba787f51056c147aa682",
"src": "https://github.com/tpope/vim-abolish" "src": "https://github.com/tpope/vim-abolish"
@@ -144,7 +136,7 @@
"src": "https://github.com/tpope/vim-fugitive" "src": "https://github.com/tpope/vim-fugitive"
}, },
"vimtex": { "vimtex": {
"rev": "82d2305ff71dfb3bd91602534cc9bb9a195bcb38", "rev": "182ad387e3f3107699483606c9a2b6648f8437b2",
"src": "https://github.com/lervag/vimtex" "src": "https://github.com/lervag/vimtex"
} }
} }