feat: more changes

This commit is contained in:
Tine Jozelj 2024-01-28 18:41:33 +01:00
parent a937938345
commit b5a5a98cff
Signed by: mentos1386
SSH key fingerprint: SHA256:MNtTsLbihYaWF8j1fkOHfkKNlnN1JQfxEU/rBU8nCGw
4 changed files with 78 additions and 19 deletions

View file

@ -15,7 +15,7 @@ Plug 'ojroques/vim-oscyank'
Plug 'tpope/vim-obsession'
Plug 'tmux-plugins/vim-tmux-focus-events'
" Look
Plug 'vim-airline/vim-airline'
Plug 'nvim-lualine/lualine.nvim'
Plug 'sainnhe/edge'
Plug 'Yggdroot/indentLine'
Plug 'koenverburg/peepsight.nvim'
@ -48,6 +48,7 @@ Plug 'hrsh7th/cmp-cmdline'
Plug 'hrsh7th/cmp-buffer'
Plug 'hrsh7th/cmp-path'
Plug 'hrsh7th/nvim-cmp'
Plug 'onsails/lspkind.nvim'
Plug 'folke/trouble.nvim'
call plug#end()
@ -174,17 +175,21 @@ let g:edge_diagnostic_line_highlight = 1
let g:edge_better_performance = 1
colorscheme edge
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
let g:airline_symbols.branch = ''
let g:airline_symbols.dirty=' '
let g:airline_symbols.linenr = '☰ '
let g:airline_symbols.maxlinenr = ''
let g:airline_left_sep=''
let g:airline_right_sep=''
let g:airline_detect_spell=0
let g:airline#extensions#coc#enabled = 1
let g:airline#parts#ffenc#skip_expected_string='utf-8[unix]'
let g:airline_theme = 'edge'
lua << END
require('lualine').setup({
options = {
theme = 'edge',
section_separators = {'', ''},
component_separators = {'', ''},
icons_enabled = true,
},
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff'},
lualine_c = {'filename'},
lualine_x = {'diagnostics', 'filetype'},
lualine_y = {'progress'},
lualine_z = {'location'}
},
})
END

View file

@ -17,7 +17,26 @@ require("codeium").setup({})
require("cmp_git").setup()
local cmp = require("cmp")
local lspkind = require("lspkind")
lspkind.init({
symbol_map = { Copilot = "", Codeium = "" },
})
vim.opt.completeopt = "menu,menuone,noselect"
cmp.setup({
formatting = {
fields = { "abbr", "kind" },
format = lspkind.cmp_format({
mode = "symbol_text",
maxwidth = function()
return math.min(40, math.floor(vim.o.columns * 0.4))
end,
ellipsis_char = "...",
before = function(entry, item)
item.menu = ""
return item
end,
}),
},
snippet = {
-- REQUIRED - you must specify a snippet engine
expand = function(args)
@ -36,7 +55,18 @@ 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)
local col = vim.fn.col(".") - 1
if cmp.visible() then
cmp.select_next_item(select_opts)
elseif col == 0 or vim.fn.getline("."):sub(col, col):match("%s") then
fallback()
else
cmp.complete()
end
end, { "i", "s" }),
}),
sources = cmp.config.sources({
{ name = "copilot" },

View file

@ -64,4 +64,12 @@ require("gitsigns").setup({
delay = 500,
virt_text_pos = "eol",
},
signs = {
add = { text = "+" },
change = { text = "~" },
delete = { text = "-" },
topdelete = { text = "-" },
changedelete = { text = "~" },
untracked = { text = "" },
},
})

View file

@ -1,7 +1,13 @@
require("commander").setup({
prompt_title = "Help | Keybindings",
components = {
"DESC",
"KEYS",
},
integration = {
telescope = {
enable = true,
theme = require("telescope.themes").commander,
},
},
})
@ -45,12 +51,22 @@ vim.api.nvim_create_autocmd("LspAttach", {
end,
keys = { "n", "<space>f", opts },
},
{ desc = "LSP References", cmd = "<CMD>Telescope lsp_references<CR>", keys = { "n", "<leader>gr" } },
{
desc = "LSP Diagnostics",
cmd = "<CMD>Telescope diagnostics bufnr=0<CR>",
keys = { "n", "<leader>fcdi" },
cmd = function()
require("trouble").toggle("document_diagnostics")
end,
keys = { "n", "<space>d" },
},
{
desc = "LSP Diagnostics whole workspace",
cmd = function()
require("trouble").toggle("workspace_diagnostics")
end,
keys = { "n", "<space>dw" },
},
{ desc = "LSP References", cmd = "<CMD>Telescope lsp_references<CR>", keys = { "n", "<leader>gr" } },
{ desc = "LSP Definitions", cmd = "<CMD>Telescope lsp_definitions<CR>", keys = { "n", "<leader>fcde" } },
{
desc = "LSP Document Symbols",