post flakes cleanup and neovim updates
This commit is contained in:
parent
a7fc11fcde
commit
d89ca3c8aa
2 changed files with 94 additions and 88 deletions
11
home.nix
11
home.nix
|
@ -78,7 +78,7 @@
|
||||||
sqlite
|
sqlite
|
||||||
stylua
|
stylua
|
||||||
stack
|
stack
|
||||||
# sumneko-lua-language-server
|
sumneko-lua-language-server
|
||||||
tealdeer
|
tealdeer
|
||||||
tig
|
tig
|
||||||
tokei
|
tokei
|
||||||
|
@ -270,19 +270,14 @@
|
||||||
gforksync="git fetch upstream && git merge upstream/master && git push origin master";
|
gforksync="git fetch upstream && git merge upstream/master && git push origin master";
|
||||||
grep="grep --color=auto";
|
grep="grep --color=auto";
|
||||||
new-sbt="sbt new scala/scala-seed.g8";
|
new-sbt="sbt new scala/scala-seed.g8";
|
||||||
nixre="home-manager switch";
|
nixre="nix build && sudo ./result/activate";
|
||||||
nixedit="home-manager edit";
|
|
||||||
nixinfo="nix-shell -p nix-info --run \"nix-info -m\"";
|
nixinfo="nix-shell -p nix-info --run \"nix-info -m\"";
|
||||||
nixgc="nix-collect-garbage -d";
|
nixgc="nix-collect-garbage -d";
|
||||||
nixq="nix-env -qa";
|
nixq="nix-env -qa";
|
||||||
nixupdate="nix-channel --update";
|
nixupdate="sudo nix-channel --update";
|
||||||
nixupgrade="nix upgrade-nix";
|
|
||||||
nixup="nix-env -u";
|
|
||||||
nixversion="nix eval nixpkgs.lib.version";
|
nixversion="nix eval nixpkgs.lib.version";
|
||||||
nixdaemon="sudo launchctl load /Library/LaunchDaemons/org.nixos.nix-daemon.plist && launchctl start org.nixos.nix-daemon";
|
|
||||||
rmxcodederived="rm -fr ~/Library/Developer/Xcode/DerivedData";
|
rmxcodederived="rm -fr ~/Library/Developer/Xcode/DerivedData";
|
||||||
v="nvim";
|
v="nvim";
|
||||||
tabninecfg="vc /Users/salar/Library/Preferences/TabNine/TabNine.toml";
|
|
||||||
sshfre1="ssh salar@fre1.softinio.net";
|
sshfre1="ssh salar@fre1.softinio.net";
|
||||||
sshfre2="ssh -p 2022 salar@fre2.softinio.net";
|
sshfre2="ssh -p 2022 salar@fre2.softinio.net";
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,9 +7,9 @@ local function load_plugins()
|
||||||
require('packer').startup(function()
|
require('packer').startup(function()
|
||||||
use 'wbthomason/packer.nvim' -- Package manager
|
use 'wbthomason/packer.nvim' -- Package manager
|
||||||
use 'neovim/nvim-lspconfig' -- Collection of configurations for built-in LSP client
|
use 'neovim/nvim-lspconfig' -- Collection of configurations for built-in LSP client
|
||||||
-- use 'nvim-treesitter/nvim-treesitter'
|
use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' }
|
||||||
-- use 'nvim-treesitter/nvim-treesitter-textobjects'
|
use 'nvim-treesitter/nvim-treesitter-textobjects'
|
||||||
-- use 'nvim-treesitter/playground'
|
use 'nvim-treesitter/playground'
|
||||||
use 'folke/which-key.nvim'
|
use 'folke/which-key.nvim'
|
||||||
use 'folke/lua-dev.nvim'
|
use 'folke/lua-dev.nvim'
|
||||||
use 'folke/tokyonight.nvim' -- Theme
|
use 'folke/tokyonight.nvim' -- Theme
|
||||||
|
@ -129,83 +129,94 @@ _G.load_config = function()
|
||||||
require('nvim-tree').setup()
|
require('nvim-tree').setup()
|
||||||
|
|
||||||
-- Treesitter
|
-- Treesitter
|
||||||
-- require('nvim-treesitter.configs').setup {
|
require('nvim-treesitter.configs').setup {
|
||||||
-- query_linter = {
|
query_linter = {
|
||||||
-- enable = true,
|
enable = true,
|
||||||
-- use_virtual_text = true,
|
use_virtual_text = true,
|
||||||
-- lint_events = { 'BufWrite', 'CursorHold' },
|
lint_events = { 'BufWrite', 'CursorHold' },
|
||||||
-- },
|
},
|
||||||
-- ensure_installed = 'maintained',
|
-- ensure_installed = 'maintained',
|
||||||
-- highlight = { enable = true },
|
highlight = { enable = true },
|
||||||
-- incremental_selection = {
|
incremental_selection = {
|
||||||
-- enable = true,
|
enable = true,
|
||||||
-- keymaps = {
|
keymaps = {
|
||||||
-- init_selection = 'gnn',
|
init_selection = 'gnn',
|
||||||
-- node_incremental = 'grn',
|
node_incremental = 'grn',
|
||||||
-- scope_incremental = 'grc',
|
scope_incremental = 'grc',
|
||||||
-- node_decremental = 'grm',
|
node_decremental = 'grm',
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
-- indent = {
|
indent = {
|
||||||
-- enable = true,
|
enable = true,
|
||||||
-- },
|
},
|
||||||
-- textobjects = {
|
textobjects = {
|
||||||
-- select = {
|
select = {
|
||||||
-- enable = true,
|
enable = true,
|
||||||
-- lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
|
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
|
||||||
-- keymaps = {
|
keymaps = {
|
||||||
-- -- You can use the capture groups defined in textobjects.scm
|
-- You can use the capture groups defined in textobjects.scm
|
||||||
-- ['af'] = '@function.outer',
|
['af'] = '@function.outer',
|
||||||
-- ['if'] = '@function.inner',
|
['if'] = '@function.inner',
|
||||||
-- ['ac'] = '@class.outer',
|
['ac'] = '@class.outer',
|
||||||
-- ['ic'] = '@class.inner',
|
['ic'] = '@class.inner',
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
-- move = {
|
move = {
|
||||||
-- enable = true,
|
enable = true,
|
||||||
-- set_jumps = true, -- whether to set jumps in the jumplist
|
set_jumps = true, -- whether to set jumps in the jumplist
|
||||||
-- goto_next_start = {
|
goto_next_start = {
|
||||||
-- [']m'] = '@function.outer',
|
[']m'] = '@function.outer',
|
||||||
-- [']]'] = '@class.outer',
|
[']]'] = '@class.outer',
|
||||||
-- },
|
},
|
||||||
-- goto_next_end = {
|
goto_next_end = {
|
||||||
-- [']M'] = '@function.outer',
|
[']M'] = '@function.outer',
|
||||||
-- [']['] = '@class.outer',
|
[']['] = '@class.outer',
|
||||||
-- },
|
},
|
||||||
-- goto_previous_start = {
|
goto_previous_start = {
|
||||||
-- ['[m'] = '@function.outer',
|
['[m'] = '@function.outer',
|
||||||
-- ['[['] = '@class.outer',
|
['[['] = '@class.outer',
|
||||||
-- },
|
},
|
||||||
-- goto_previous_end = {
|
goto_previous_end = {
|
||||||
-- ['[M'] = '@function.outer',
|
['[M'] = '@function.outer',
|
||||||
-- ['[]'] = '@class.outer',
|
['[]'] = '@class.outer',
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
-- playground = {
|
playground = {
|
||||||
-- enable = true,
|
enable = true,
|
||||||
-- disable = {},
|
disable = {},
|
||||||
-- updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code
|
updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code
|
||||||
-- persist_queries = false, -- Whether the query persists across vim sessions
|
persist_queries = false, -- Whether the query persists across vim sessions
|
||||||
-- keybindings = {
|
keybindings = {
|
||||||
-- toggle_query_editor = 'o',
|
toggle_query_editor = 'o',
|
||||||
-- toggle_hl_groups = 'i',
|
toggle_hl_groups = 'i',
|
||||||
-- toggle_injected_languages = 't',
|
toggle_injected_languages = 't',
|
||||||
-- toggle_anonymous_nodes = 'a',
|
toggle_anonymous_nodes = 'a',
|
||||||
-- toggle_language_display = 'I',
|
toggle_language_display = 'I',
|
||||||
-- focus_language = 'f',
|
focus_language = 'f',
|
||||||
-- unfocus_language = 'F',
|
unfocus_language = 'F',
|
||||||
-- update = 'R',
|
update = 'R',
|
||||||
-- goto_node = '<cr>',
|
goto_node = '<cr>',
|
||||||
-- show_help = '?',
|
show_help = '?',
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
-- rainbow = {
|
rainbow = {
|
||||||
-- enable = true,
|
enable = true,
|
||||||
-- extended_mode = true,
|
extended_mode = true,
|
||||||
-- max_file_lines = 1000,
|
max_file_lines = 1000,
|
||||||
-- },
|
},
|
||||||
-- }
|
}
|
||||||
|
-- vim.opt.foldmethod = 'expr'
|
||||||
|
-- vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
|
||||||
|
---WORKAROUND
|
||||||
|
vim.api.nvim_create_autocmd({'BufEnter','BufAdd','BufNew','BufNewFile','BufWinEnter'}, {
|
||||||
|
group = vim.api.nvim_create_augroup('TS_FOLD_WORKAROUND', {}),
|
||||||
|
callback = function()
|
||||||
|
vim.opt.foldmethod = 'expr'
|
||||||
|
vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
|
||||||
|
end
|
||||||
|
})
|
||||||
|
---ENDWORKAROUND
|
||||||
|
|
||||||
-- neogit
|
-- neogit
|
||||||
require('neogit').setup {
|
require('neogit').setup {
|
||||||
|
|
Loading…
Reference in a new issue