diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 8de9364..6b2b463 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -7,11 +7,13 @@ call plug#begin() Plug 'neovim/nvim-lspconfig' Plug 'RishabhRD/popfix' Plug 'RishabhRD/nvim-lsputils' - Plug 'folke/which-key.nvim' + "Plug 'folke/which-key.nvim' Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} Plug 'nvim-lua/plenary.nvim' Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.x' } Plug 'glepnir/lspsaga.nvim', { 'branch': 'main' } + Plug 'lervag/vimtex' + Plug 'akinsho/toggleterm.nvim', {'tag' : '*'} call plug#end() colorscheme carbonfox @@ -22,11 +24,24 @@ let mapleader="\" lua << END local builtin = require('telescope.builtin') require'nvim-treesitter.configs'.setup {} - require("which-key").setup {} + --require("which-key").setup {} require'nvim-web-devicons'.get_icons() require('lualine').setup() require('bufferline').setup() - require('lspsaga').init_lsp_saga() + require('lspsaga').init_lsp_saga({ + code_action_lightbulb = { + enable = true, + enable_in_insert = true, + cache_code_action = true, + sign = true, + update_time = 150, + sign_priority = 20, + virtual_text = true, + } + }) + require("toggleterm").setup{ + open_mapping = [[]] + } -- Keybindings vim.keymap.set('n', 'ff', builtin.find_files, {}) @@ -42,6 +57,7 @@ lua << END vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) vim.keymap.set('n', 'q', vim.diagnostic.setloclist, opts) + vim.keymap.set({"n","v"}, "ca", "Lspsaga code_action") -- Use an on_attach function to only map the following keys -- after the language server attaches to the current buffer @@ -54,6 +70,12 @@ lua << END local bufopts = { noremap=true, silent=true, buffer=bufnr } vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) + vim.keymap.set("n", "gh", "Lspsaga lsp_finder", { silent = true }) + vim.keymap.set("n", "gr", "Lspsaga rename", { silent = true }) + + -- Show line diagnostics + vim.keymap.set("n", "cd", "Lspsaga show_line_diagnostics", { silent = true }) + vim.keymap.set("n", "cd", "Lspsaga show_cursor_diagnostics", { silent = true }) vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts) vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts) vim.keymap.set('n', '', vim.lsp.buf.signature_help, bufopts) @@ -64,11 +86,10 @@ lua << END end, bufopts) vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, bufopts) vim.keymap.set('n', 'rn', vim.lsp.buf.rename, bufopts) - vim.keymap.set({"n","v"}, "ca", "Lspsaga code_action", { silent = true }) vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts) vim.keymap.set('n', 'f', function() vim.lsp.buf.format { async = true } end, bufopts) end - require'lspconfig'.jedi_language_server.setup{ on_attach = on_attach } + require'lspconfig'.pyright.setup{ on_attach = on_attach } require'lspconfig'.hls.setup{on_attach = on_attach} END diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..be3f5ec --- /dev/null +++ b/.zshrc @@ -0,0 +1,12 @@ +# Use powerline +USE_POWERLINE="true" +# Source manjaro-zsh-configuration +if [[ -e /usr/share/zsh/manjaro-zsh-config ]]; then + source /usr/share/zsh/manjaro-zsh-config +fi +# Use manjaro zsh prompt +if [[ -e /usr/share/zsh/manjaro-zsh-prompt ]]; then + source /usr/share/zsh/manjaro-zsh-prompt +fi + +export PATH=/home/christoph/.ghcup/bin:/home/christoph/.local/bin:$PATH