diff --git a/config/foot/foot.ini b/config/foot/foot.ini index 4200aa9..2919167 100644 --- a/config/foot/foot.ini +++ b/config/foot/foot.ini @@ -9,7 +9,7 @@ term=xterm-256color # title=foot # locked-title=no -font=Iosevka Custom:size=12 +font=Iosevka Custom:size=12, codicon:size=12, Symbols Nerd Font Mono:size=12 # font-bold= # font-italic= # font-bold-italic= diff --git a/config/kanshi/config b/config/kanshi/config index ceb2556..361bc90 100644 --- a/config/kanshi/config +++ b/config/kanshi/config @@ -1,28 +1,24 @@ profile "default" { - output DP-2 enable scale 1.25 position 0,0 - - exec swaymsg focus output DP-2 + output "LG Electronics LG ULTRAFINE 210MABTPQU13" enable scale 1.25 position 0,0 } profile "with kamwas" { - output DP-2 enable scale 1.25 position 0,0 - # output HDMI-A-3 enable position 3072,0 - output HDMI-A-3 enable position 0,1728 - - exec swaymsg focus output DP-2 + output "LG Electronics LG ULTRAFINE 210MABTPQU13" enable scale 1.25 position 0,0 + # output "HAT Kamvas Pro 16 0x01010101" enable position 3072,0 + output "HAT Kamvas Pro 16 0x01010101" enable position 0,1728 } profile "laptop" { - output eDP-1 enable position 0,0 + output eDP-1 enable position 0,0 exec swaymsg focus output eDP-1 } profile "laptop with kamwas" { - output eDP-1 enable position 0,0 - output HDMI-A-1 enable position 2560,0 + output eDP-1 enable position 0,0 + output "HAT Kamvas Pro 16 0x01010101" enable position 2560,0 exec swaymsg focus output eDP-1 } diff --git a/config/nvim/init.vim b/config/nvim/init.vim index d7da821..de6b5fe 100644 --- a/config/nvim/init.vim +++ b/config/nvim/init.vim @@ -28,7 +28,7 @@ Plug 'HerringtonDarkholme/yats.vim' Plug 'm-pilia/vim-ccls' Plug 'm-pilia/vim-yggdrasil' -Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} +Plug 'nvim-treesitter/nvim-treesitter', {'branch': 'main', 'do': ':TSUpdate'} " Fish shell Plug 'dag/vim-fish' @@ -76,14 +76,15 @@ Plug 'godlygeek/tabular' Plug 'neovim/nvim-lspconfig' Plug 'tamago324/nlsp-settings.nvim' Plug 'williamboman/nvim-lsp-installer' -Plug 'hrsh7th/cmp-nvim-lsp' Plug 'folke/lsp-colors.nvim' " Plug 'jose-elias-alvarez/null-ls.nvim' +Plug 'onsails/lspkind.nvim' +Plug 'hrsh7th/nvim-cmp' Plug 'hrsh7th/cmp-buffer' " Plug 'hrsh7th/cmp-path' Plug 'hrsh7th/cmp-cmdline' -Plug 'hrsh7th/nvim-cmp' +Plug 'hrsh7th/cmp-nvim-lsp' " For luasnip users. Plug 'saadparwaiz1/cmp_luasnip' @@ -117,7 +118,7 @@ Plug 'nvim-telescope/telescope.nvim' Plug 'MunifTanjim/nui.nvim' Plug 'nvim-neo-tree/neo-tree.nvim' -Plug 'jiangmiao/auto-pairs' +" Plug 'jiangmiao/auto-pairs' call plug#end() @@ -434,11 +435,61 @@ local has_words_before = function() end require("luasnip.loaders.from_vscode").lazy_load() +local lspkind = require("lspkind") + +lspkind.init({ + -- enables text annotations + -- + -- default: true + mode = 'symbol_text', + + -- default symbol map + -- can be either 'default' (requires nerd-fonts font) or + -- 'codicons' for codicon preset (requires vscode-codicons font) + -- + -- default: 'default' + preset = 'codicons', + + -- override preset symbols + -- + -- default: {} + symbol_map = { + Text = "󰉿 ", + Method = "󰆧 ", + Function = "󰊕 ", + Constructor = " ", + Field = "󰜢 ", + Variable = " ", + Class = "󰠱 ", + Interface = " ", + Module = " ", + Property = "󰜢 ", + Unit = "󰑭 ", + Value = "󰎠 ", + Enum = " ", + Keyword = "󰌋 ", + Snippet = " ", + Color = "󰏘 ", + File = "󰈙 ", + Reference = "󰈇 ", + Folder = "󰉋 ", + EnumMember = " ", + Constant = "󰏿 ", + Struct = "󰙅 ", + Event = " ", + Operator = "󰆕 ", + TypeParameter = "" + }, +}) cmp.setup({ experimental = { ghost_text = { hl_group = 'Comment' } }, + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), + }, snippet = { -- REQUIRED - you must specify a snippet engine expand = function(args) @@ -491,7 +542,33 @@ cmp.setup({ { name = 'luasnip' }, -- For luasnip users. }, { { name = 'buffer' }, - }) + }), + formatting = { + fields = { 'abbr', 'icon', 'kind', 'menu' }, + format = lspkind.cmp_format({ + menu = ({ + buffer = "[buffer] ", + nvim_lsp = "[lsp] ", + luasnip = "[snippet] ", + }), + maxwidth = { + -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters) + -- can also be a function to dynamically calculate max width such as + -- menu = function() return math.floor(0.45 * vim.o.columns) end, + menu = 50, -- leading text (labelDetails) + abbr = 50, -- actual suggestion item + }, + ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first) + show_labelDetails = true, -- show labelDetails in menu. Disabled by default + + -- The function below will be called before any actual modifications from lspkind + -- so that you can provide more controls on popup customization. (See [#30](https://github.com/onsails/lspkind-nvim/pull/30)) + before = function (entry, vim_item) + -- ... + return vim_item + end + }) + } }) -- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore). @@ -677,6 +754,18 @@ require("neo-tree").setup({ -- buf_set_keymap('n', 'tn', 'lua require('neotest').run.run()', opts) -- buf_set_keymap('n', 'f', 'lua vim.lsp.buf.formatting()', opts) + + +-- vim.api.nvim_create_autocmd("FileType", { +-- pattern = { "cs", "gdscript", "gdshader", "ruby", "js", "json", "markdown" }, +-- callback = function() +-- vim.treesitter.start() +-- vim.opt_local.foldexpr = "v:lua.vim.treesitter.foldexpr()" +-- vim.opt_local.foldmethod = "expr" +-- vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" +-- end, +-- }) + EOF " neotest keybindings diff --git a/profile b/profile index 4a1ef73..f09d129 100644 --- a/profile +++ b/profile @@ -49,7 +49,7 @@ export DOTNET_CLI_TELEMETRY_OPTOUT=true # export MESA_VK_DEVICE_SELECT=10de:249d # Omen iGPU amd -# export MESA_VK_DEVICE_SELECT=1002:1638 +# export MESA_VK_DEVICE_SELECT=1002:164e # pass export PASSWORD_STORE_CLIP_TIME=10