dotfiles
This commit is contained in:
parent
fbb7563609
commit
7610439e36
2 changed files with 38 additions and 5 deletions
|
@ -7,11 +7,13 @@ call plug#begin()
|
||||||
Plug 'neovim/nvim-lspconfig'
|
Plug 'neovim/nvim-lspconfig'
|
||||||
Plug 'RishabhRD/popfix'
|
Plug 'RishabhRD/popfix'
|
||||||
Plug 'RishabhRD/nvim-lsputils'
|
Plug 'RishabhRD/nvim-lsputils'
|
||||||
Plug 'folke/which-key.nvim'
|
"Plug 'folke/which-key.nvim'
|
||||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||||
Plug 'nvim-lua/plenary.nvim'
|
Plug 'nvim-lua/plenary.nvim'
|
||||||
Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.x' }
|
Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.x' }
|
||||||
Plug 'glepnir/lspsaga.nvim', { 'branch': 'main' }
|
Plug 'glepnir/lspsaga.nvim', { 'branch': 'main' }
|
||||||
|
Plug 'lervag/vimtex'
|
||||||
|
Plug 'akinsho/toggleterm.nvim', {'tag' : '*'}
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
colorscheme carbonfox
|
colorscheme carbonfox
|
||||||
|
@ -22,11 +24,24 @@ let mapleader="\<space>"
|
||||||
lua << END
|
lua << END
|
||||||
local builtin = require('telescope.builtin')
|
local builtin = require('telescope.builtin')
|
||||||
require'nvim-treesitter.configs'.setup {}
|
require'nvim-treesitter.configs'.setup {}
|
||||||
require("which-key").setup {}
|
--require("which-key").setup {}
|
||||||
require'nvim-web-devicons'.get_icons()
|
require'nvim-web-devicons'.get_icons()
|
||||||
require('lualine').setup()
|
require('lualine').setup()
|
||||||
require('bufferline').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 = [[<c-\>]]
|
||||||
|
}
|
||||||
|
|
||||||
-- Keybindings
|
-- Keybindings
|
||||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
|
vim.keymap.set('n', '<leader>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_prev, opts)
|
||||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
|
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
|
||||||
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
|
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
|
||||||
|
vim.keymap.set({"n","v"}, "<leader>ca", "<cmd>Lspsaga code_action<CR>")
|
||||||
|
|
||||||
-- Use an on_attach function to only map the following keys
|
-- Use an on_attach function to only map the following keys
|
||||||
-- after the language server attaches to the current buffer
|
-- after the language server attaches to the current buffer
|
||||||
|
@ -54,6 +70,12 @@ lua << END
|
||||||
local bufopts = { noremap=true, silent=true, buffer=bufnr }
|
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.declaration, bufopts)
|
||||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
|
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
|
||||||
|
vim.keymap.set("n", "gh", "<cmd>Lspsaga lsp_finder<CR>", { silent = true })
|
||||||
|
vim.keymap.set("n", "gr", "<cmd>Lspsaga rename<CR>", { silent = true })
|
||||||
|
|
||||||
|
-- Show line diagnostics
|
||||||
|
vim.keymap.set("n", "<leader>cd", "<cmd>Lspsaga show_line_diagnostics<CR>", { silent = true })
|
||||||
|
vim.keymap.set("n", "<leader>cd", "<cmd>Lspsaga show_cursor_diagnostics<CR>", { silent = true })
|
||||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
|
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
|
||||||
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
|
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
|
||||||
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, bufopts)
|
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, bufopts)
|
||||||
|
@ -64,11 +86,10 @@ lua << END
|
||||||
end, bufopts)
|
end, bufopts)
|
||||||
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, bufopts)
|
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, bufopts)
|
||||||
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, bufopts)
|
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, bufopts)
|
||||||
vim.keymap.set({"n","v"}, "<leader>ca", "<cmd>Lspsaga code_action<CR>", { silent = true })
|
|
||||||
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
|
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
|
||||||
vim.keymap.set('n', '<space>f', function() vim.lsp.buf.format { async = true } end, bufopts)
|
vim.keymap.set('n', '<space>f', function() vim.lsp.buf.format { async = true } end, bufopts)
|
||||||
end
|
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}
|
require'lspconfig'.hls.setup{on_attach = on_attach}
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|
12
.zshrc
Normal file
12
.zshrc
Normal file
|
@ -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
|
Loading…
Add table
Reference in a new issue