configure vim

This commit is contained in:
Adithya 2023-06-04 13:52:38 +05:30
parent 7f0236a0f1
commit 4046598838
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
2 changed files with 87 additions and 27 deletions

View file

@ -13,6 +13,11 @@
ripgrep ripgrep
tree-sitter tree-sitter
nil nil
nodePackages.yaml-language-server
statix
alejandra
commitlint
shellcheck
]; ];
plugins = with pkgs.vimExtraPlugins; [ plugins = with pkgs.vimExtraPlugins; [
{ {
@ -24,18 +29,6 @@
} }
''; '';
} }
{
plugin = dracula-nvim;
type = "lua";
config = ''
require("dracula").setup({
show_end_of_buffer = true,
transparent_bg = true,
italic_comment = true
})
vim.cmd[[colorscheme dracula]]
'';
}
{ {
plugin = nvim-tree-lua; plugin = nvim-tree-lua;
type = "lua"; type = "lua";
@ -49,6 +42,46 @@
} }
''; '';
} }
{
plugin = bufferline-nvim;
type = "lua";
config = ''
require("bufferline").setup{
options = {
offsets = {
{
filetype = "NvimTree",
text = "File Explorer",
separator = true
}
},
diagnostics = "nvim_lsp",
separator_style = "slant",
truncate_names = true
}
}
'';
}
{
plugin = dracula-vim;
type = "lua";
config = ''
vim.cmd[[colorscheme dracula]]
'';
}
{
plugin = lualine-nvim;
type = "lua";
config = ''
require('lualine').setup {
options = {
icons_enabled = true,
theme = 'dracula',
globalstatus = true
}
}
'';
}
{ {
plugin = git-blame-nvim; plugin = git-blame-nvim;
type = "lua"; type = "lua";
@ -76,19 +109,6 @@
} }
''; '';
} }
{
plugin = lualine-nvim;
type = "lua";
config = ''
require('lualine').setup {
options = {
icons_enabled = true,
theme = 'dracula-nvim',
globalstatus = true
}
}
'';
}
{ {
plugin = nvim-lastplace; plugin = nvim-lastplace;
type = "lua"; type = "lua";
@ -103,6 +123,8 @@
require('toggleterm').setup{} require('toggleterm').setup{}
''; '';
} }
{plugin = plenary-nvim;}
{plugin = telescope-nvim;}
{ {
plugin = nvim-treesitter-context; plugin = nvim-treesitter-context;
type = "lua"; type = "lua";
@ -154,12 +176,49 @@
config = '' config = ''
require('lspconfig').bashls.setup{} require('lspconfig').bashls.setup{}
require('lspconfig').dockerls.setup{} require('lspconfig').dockerls.setup{}
require('lspconfig').docker_compose_language_service.setup{}
require('lspconfig').gopls.setup{} require('lspconfig').gopls.setup{}
require('lspconfig').jsonls.setup{} require('lspconfig').jsonls.setup{}
require('lspconfig').marksman.setup{} require('lspconfig').marksman.setup{}
require('lspconfig').nil_ls.setup{} require('lspconfig').nil_ls.setup{}
require('lspconfig').rust_analyzer.setup{} require('lspconfig').rust_analyzer.setup{}
require('lspconfig').yamlls.setup {
settings = {
yaml = {
schemas = {
["https://json.schemastore.org/github-workflow.json"] = "/.github/workflows/*",
["https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json"] = "/docker-compose.yml",
["https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json"] = "/docker-compose.yaml"
}
}
}
}
'';
}
{
plugin = null-ls-nvim;
type = "lua";
config = ''
null_ls = require("null-ls")
local sources = {
null_ls.builtins.code_actions.statix,
null_ls.builtins.completion.luasnip,
null_ls.builtins.diagnostics.actionlint,
null_ls.builtins.diagnostics.commitlint,
null_ls.builtins.diagnostics.shellcheck,
null_ls.builtins.diagnostics.statix,
null_ls.builtins.formatting.alejandra,
null_ls.builtins.formatting.fixjson,
null_ls.builtins.formatting.gofmt,
null_ls.builtins.formatting.mdformat,
null_ls.builtins.formatting.rustfmt,
null_ls.builtins.formatting.yamlfmt
}
null_ls.setup({
sources = sources
})
''; '';
} }
]; ];
@ -186,7 +245,7 @@
nmap <C-a> <cmd>bp<Return> nmap <C-a> <cmd>bp<Return>
nmap <C-d> <cmd>bn<Return> nmap <C-d> <cmd>bn<Return>
nnoremap <C-h> <cmd>noh<Return> nnoremap <C-h> <cmd>noh<Return>
nnoremap <leader>w <cmd>bdelete<cmd>bnext<Return> nnoremap <leader>w <cmd>bdelete<CR><cmd>bnext<Return>
nnoremap <leader>` <cmd>ToggleTerm<Return> nnoremap <leader>` <cmd>ToggleTerm<Return>
nnoremap <leader>1 <cmd>NvimTreeToggle<Return> nnoremap <leader>1 <cmd>NvimTreeToggle<Return>
nnoremap <leader>ff <cmd>Telescope find_files<cr> nnoremap <leader>ff <cmd>Telescope find_files<cr>

View file

@ -18,6 +18,7 @@
extraConfig = '' extraConfig = ''
set -g update-environment 'TERM DISPLAY WAYLAND_DISPLAY SWAYSOCK HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP' set -g update-environment 'TERM DISPLAY WAYLAND_DISPLAY SWAYSOCK HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP'
if "[[ ''${TERM} =~ 256color || ''${TERM} == xterm-kitty || ''${TERM} == fbterm ]]" 'set -g default-terminal tmux-256color' if "[[ ''${TERM} =~ 256color || ''${TERM} == xterm-kitty || ''${TERM} == fbterm ]]" 'set -g default-terminal tmux-256color'
set-option -sa terminal-features ',xterm-kitty:RGB'
set -g allow-rename on set -g allow-rename on
set -g set-titles on set -g set-titles on
set -g set-titles-string "#W" set -g set-titles-string "#W"