nvim: add smartcolumn
This commit is contained in:
parent
1815894015
commit
c8f927f4dc
5 changed files with 72 additions and 26 deletions
|
|
@ -22,6 +22,12 @@ let
|
|||
version = mkVersionInput inputs.nvim-treesitter-textsubjects;
|
||||
src = inputs.nvim-treesitter-textsubjects;
|
||||
};
|
||||
|
||||
smartcolumn-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "smartcolumn-nvim";
|
||||
version = mkVersionInput inputs.smartcolumn-nvim;
|
||||
src = inputs.smartcolumn-nvim;
|
||||
};
|
||||
in
|
||||
{
|
||||
options.my.programs.vim = {
|
||||
|
|
@ -83,6 +89,7 @@ in
|
|||
nvim-web-devicons # for dashboard-nvim
|
||||
orgmode
|
||||
plenary-nvim # for telescope, neogit
|
||||
smartcolumn-nvim
|
||||
telescope-nvim
|
||||
vim-lion
|
||||
which-key-nvim
|
||||
|
|
|
|||
|
|
@ -100,8 +100,8 @@ cmp.setup({
|
|||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
mode = "symbol", -- show only symbol annotations
|
||||
maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
|
||||
ellipsis_char = "...", -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
|
||||
maxwidth = 50, -- prevent the popup from showing more than provided characters
|
||||
ellipsis_char = "...", -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead
|
||||
symbol_map = {
|
||||
Copilot = "",
|
||||
},
|
||||
|
|
@ -118,7 +118,7 @@ cmp.setup({
|
|||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
|
|
@ -447,3 +447,7 @@ require("nvim-tree").setup()
|
|||
wk.register({
|
||||
t = { "<cmd>NvimTreeFindFileToggle<cr>", "nvim tree" },
|
||||
}, { prefix = "<leader>t", silent = true })
|
||||
|
||||
require("smartcolumn").setup({
|
||||
colorcolumn = 120,
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue