mirror of
https://github.com/Ajetski/dotfiles.git
synced 2025-09-30 11:33:18 -09:00
add rust tools
This commit is contained in:
parent
30380008b4
commit
283124d84c
6
.bashrc
6
.bashrc
@ -144,7 +144,7 @@ alias termconfig="nvim ~/.config/alacritty/alacritty.yml"
|
|||||||
alias shconfig="nvim ~/.bashrc"
|
alias shconfig="nvim ~/.bashrc"
|
||||||
alias shellconfig="nvim ~/.bashrc"
|
alias shellconfig="nvim ~/.bashrc"
|
||||||
alias vimconfig="nvim ~/.vim/vimrc"
|
alias vimconfig="nvim ~/.vim/vimrc"
|
||||||
alias nvimconfig="nvim ~/.config/nvim/init.vim"
|
alias nvimconfig="nvim ~/.config/nvim/init.lua"
|
||||||
alias tmuxconfig="nvim $TMUX_CONFIG"
|
alias tmuxconfig="nvim $TMUX_CONFIG"
|
||||||
alias i3config="nvim ~/.config/i3/config"
|
alias i3config="nvim ~/.config/i3/config"
|
||||||
alias i3blocksconfig="nvim ~/.config/i3blocks/config"
|
alias i3blocksconfig="nvim ~/.config/i3blocks/config"
|
||||||
@ -155,14 +155,16 @@ alias nt="alacritty&"
|
|||||||
alias tn="tmux -u -f $TMUX_CONFIG new"
|
alias tn="tmux -u -f $TMUX_CONFIG new"
|
||||||
alias ta="tmux -u -f $TMUX_CONFIG attach"
|
alias ta="tmux -u -f $TMUX_CONFIG attach"
|
||||||
alias tl="tmux list-sessions"
|
alias tl="tmux list-sessions"
|
||||||
|
alias o="rg --files . | fzf | xargs nvim"
|
||||||
|
|
||||||
|
|
||||||
#enable vim mode
|
#enable vim mode
|
||||||
set -o vi
|
set -o vi
|
||||||
|
|
||||||
#startup eyecandy
|
#startup eyecandy
|
||||||
wal -i ~/Pictures/Wallpapers/bg.jpg -q
|
#wal -i ~/Pictures/Wallpapers/bg.jpg -q
|
||||||
pfetch
|
pfetch
|
||||||
|
|
||||||
|
|
||||||
. "$HOME/.cargo/env"
|
. "$HOME/.cargo/env"
|
||||||
|
export PATH=$PATH:/snap/bin/zig:~/.scripts/utils:~/.scripts/setup
|
||||||
|
@ -6,10 +6,10 @@ font:
|
|||||||
|
|
||||||
window:
|
window:
|
||||||
padding:
|
padding:
|
||||||
x: 15
|
x: 5
|
||||||
y: 15
|
y: 5
|
||||||
decorations: none
|
decorations: none
|
||||||
opacity: 0.7
|
opacity: 0.6
|
||||||
#opacity: .90
|
#opacity: .90
|
||||||
#opacity: 1
|
#opacity: 1
|
||||||
|
|
||||||
|
@ -18,8 +18,6 @@ vim.o.visualbell = true -- blink cursor on error, instead of beeping
|
|||||||
vim.cmd('set invlist')
|
vim.cmd('set invlist')
|
||||||
|
|
||||||
|
|
||||||
vim.api.nvim_set_keymap("n", "<leader>", "<Plug>(easymotion-bd-jk)", { noremap = true })
|
|
||||||
vim.keymap.set("i", "kj", "<esc>", { silent = true }) -- sets noremap automatically
|
|
||||||
vim.api.nvim_set_var("toggle_syntax_state", true)
|
vim.api.nvim_set_var("toggle_syntax_state", true)
|
||||||
|
|
||||||
-- Plugins
|
-- Plugins
|
||||||
@ -32,11 +30,13 @@ vim.call('plug#begin', '~/.config/nvim/plugged')
|
|||||||
Plug 'junegunn/goyo.vim' -- zen mode
|
Plug 'junegunn/goyo.vim' -- zen mode
|
||||||
Plug('junegunn/fzf', {['do'] = vim.fn['fzf#install']})
|
Plug('junegunn/fzf', {['do'] = vim.fn['fzf#install']})
|
||||||
Plug('nvim-treesitter/nvim-treesitter', {['do'] = vim.fn['TSUpdate']}) -- add support for text objects
|
Plug('nvim-treesitter/nvim-treesitter', {['do'] = vim.fn['TSUpdate']}) -- add support for text objects
|
||||||
|
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
|
||||||
-- Plug 'ctrlpvim/ctrlp.vim' -- minimal fuzzyfinder
|
-- Plug 'ctrlpvim/ctrlp.vim' -- minimal fuzzyfinder
|
||||||
Plug 'wadackel/vim-dogrun' -- colorscheme
|
Plug 'wadackel/vim-dogrun' -- colorscheme
|
||||||
Plug 'tribela/vim-transparent' -- clear background
|
Plug 'tribela/vim-transparent' -- clear background
|
||||||
Plug 'nvim-lua/plenary.nvim' -- testing framework, required for telescope
|
Plug 'nvim-lua/plenary.nvim' -- testing framework, required for telescope
|
||||||
Plug 'nvim-telescope/telescope.nvim' -- fancy fuzzyfinder
|
Plug 'nvim-telescope/telescope.nvim' -- fancy fuzzyfinder
|
||||||
|
Plug('nvim-telescope/telescope-fzf-native.nvim', { ['do'] = 'make' }) -- faster fzf
|
||||||
|
|
||||||
-- LSP
|
-- LSP
|
||||||
Plug "williamboman/nvim-lsp-installer"
|
Plug "williamboman/nvim-lsp-installer"
|
||||||
@ -57,7 +57,8 @@ vim.call('plug#begin', '~/.config/nvim/plugged')
|
|||||||
Plug 'sheerun/vim-polyglot'
|
Plug 'sheerun/vim-polyglot'
|
||||||
Plug 'evanleck/vim-svelte'
|
Plug 'evanleck/vim-svelte'
|
||||||
Plug 'pantharshit00/vim-prisma'
|
Plug 'pantharshit00/vim-prisma'
|
||||||
Plug 'pangloss/vim-javascript'
|
Plug 'simrat39/rust-tools.nvim'
|
||||||
|
--Plug 'pangloss/vim-javascript'
|
||||||
vim.call('plug#end')
|
vim.call('plug#end')
|
||||||
|
|
||||||
-- set colorscheme
|
-- set colorscheme
|
||||||
@ -102,6 +103,7 @@ cmp.setup({
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
local opts = { noremap=true, silent=true }
|
local opts = { noremap=true, silent=true }
|
||||||
|
local opts = { noremap=true, silent=true }
|
||||||
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
|
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
|
||||||
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)
|
||||||
@ -147,12 +149,29 @@ lspconfig.sumneko_lua.setup {}
|
|||||||
lspconfig.tsserver.setup{
|
lspconfig.tsserver.setup{
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
}
|
}
|
||||||
lspconfig.rust_analyzer.setup{
|
require('rust-tools').setup{
|
||||||
|
tools = { -- rust-tools options
|
||||||
|
autoSetHints = true,
|
||||||
|
hover_with_actions = true,
|
||||||
|
runnables = {
|
||||||
|
use_telescope = true
|
||||||
|
},
|
||||||
|
inlay_hints = {
|
||||||
|
show_parameter_hints = false,
|
||||||
|
parameter_hints_prefix = "",
|
||||||
|
other_hints_prefix = "",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
server = {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
|
flags = lsp_flags,
|
||||||
-- Server-specific settings...
|
|
||||||
settings = {
|
settings = {
|
||||||
["rust-analyzer"] = {}
|
["rust-analyzer"] = {
|
||||||
|
checkOnSave = {
|
||||||
|
command = "clippy"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
require('lspconfig')['svelte'].setup{
|
require('lspconfig')['svelte'].setup{
|
||||||
@ -181,11 +200,12 @@ telescope.setup({
|
|||||||
pickers = {},
|
pickers = {},
|
||||||
extensions = {},
|
extensions = {},
|
||||||
})
|
})
|
||||||
|
telescope.load_extension('fzf')
|
||||||
|
|
||||||
-- keymaps
|
-- keymaps
|
||||||
local opts = { noremap=true, silent=true }
|
local opts = { noremap=true, silent=true }
|
||||||
local loudOpts = { noremap=true }
|
local loud_opts = { noremap=true }
|
||||||
vim.keymap.set("n", "<c-s>", ":wa<cr>:echo 'File saved.'<cr>", loudOpts)
|
vim.keymap.set("n", "<c-s>", ":wa<cr>:echo 'File saved.'<cr>", loud_opts)
|
||||||
vim.keymap.set("n", "<c-t>", ":NERDTreeToggle<cr>", opts)
|
vim.keymap.set("n", "<c-t>", ":NERDTreeToggle<cr>", opts)
|
||||||
vim.keymap.set("n", "<leader>tt", ":TransparentToggle<cr>", opts)
|
vim.keymap.set("n", "<leader>tt", ":TransparentToggle<cr>", opts)
|
||||||
vim.keymap.set("n", "<leader>tz", ":Goyo 150<cr>", opts)
|
vim.keymap.set("n", "<leader>tz", ":Goyo 150<cr>", opts)
|
||||||
@ -199,11 +219,9 @@ vim.keymap.set('n', '<leader>fk', ':Telescope keymaps<cr>', opts)
|
|||||||
vim.keymap.set("n", "<c-p>", ":Telescope find_files<cr>", opts)
|
vim.keymap.set("n", "<c-p>", ":Telescope find_files<cr>", opts)
|
||||||
vim.keymap.set("n", "<leader>fg", ":Telescope live_grep<cr>", opts)
|
vim.keymap.set("n", "<leader>fg", ":Telescope live_grep<cr>", opts)
|
||||||
vim.keymap.set("n", "<leader>fb", ":Telescope buffers<cr>", opts)
|
vim.keymap.set("n", "<leader>fb", ":Telescope buffers<cr>", opts)
|
||||||
vim.keymap.set("n", "<leader>fh", ":Telescope help_tags<cr>", opts)
|
|
||||||
vim.keymap.set("n", "<f1>", "", opts)
|
|
||||||
vim.keymap.set("i", "<f1>", "", opts)
|
vim.keymap.set("i", "<f1>", "", opts)
|
||||||
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, opts)
|
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, opts)
|
||||||
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', '<leader>q', vim.diagnostic.setloclist, opts)
|
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, opts)
|
||||||
|
vim.keymap.set("n", "<cr>", ":nohlsearch<cr>", opts)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user