Changes from new updates, cleanup
This commit is contained in:
parent
c12acd536a
commit
c6e36add60
2 changed files with 35 additions and 41 deletions
29
home.nix
29
home.nix
|
@ -40,8 +40,10 @@
|
||||||
|
|
||||||
programs.gh = {
|
programs.gh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
editor = "nvim";
|
settings = {
|
||||||
gitProtocol = "ssh";
|
editor = "nvim";
|
||||||
|
git_protocol = "ssh";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.htop = {
|
programs.htop = {
|
||||||
|
@ -82,7 +84,6 @@
|
||||||
extensions = [
|
extensions = [
|
||||||
pkgs.vscode-extensions.scalameta.metals
|
pkgs.vscode-extensions.scalameta.metals
|
||||||
pkgs.vscode-extensions.usernamehw.errorlens
|
pkgs.vscode-extensions.usernamehw.errorlens
|
||||||
pkgs.vscode-extensions.golang.Go
|
|
||||||
pkgs.vscode-extensions.redhat.java
|
pkgs.vscode-extensions.redhat.java
|
||||||
pkgs.vscode-extensions.xyz.local-history
|
pkgs.vscode-extensions.xyz.local-history
|
||||||
pkgs.vscode-extensions.yzhang.markdown-all-in-one
|
pkgs.vscode-extensions.yzhang.markdown-all-in-one
|
||||||
|
@ -155,7 +156,7 @@
|
||||||
fenv source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh
|
fenv source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||||
end
|
end
|
||||||
|
|
||||||
set -xg PATH $HOME/bin $PATH
|
set -xg PATH $HOME/bin $HOME/.cargo/bin $PATH
|
||||||
|
|
||||||
set -xg PATH /Users/salar/.luarocks/bin:/nix/store/95wpywsjf5iiw77f6n9rw347lk1sly15-luarocks-3.2.1/bin:/Users/salar/bin:/Users/salar/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/nix/store/3qp71mhrpxxg080yc82k51nx7b5hkajr-kitty-0.21.2/Applications/kitty.app/Contents/MacOS $PATH
|
set -xg PATH /Users/salar/.luarocks/bin:/nix/store/95wpywsjf5iiw77f6n9rw347lk1sly15-luarocks-3.2.1/bin:/Users/salar/bin:/Users/salar/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/nix/store/3qp71mhrpxxg080yc82k51nx7b5hkajr-kitty-0.21.2/Applications/kitty.app/Contents/MacOS $PATH
|
||||||
|
|
||||||
|
@ -180,7 +181,7 @@
|
||||||
set -xg LUA_CPATH "?.so;/nix/store/95wpywsjf5iiw77f6n9rw347lk1sly15-luarocks-3.2.1/share/lua/5.1/?/init.lua;/Users/salar/.luarocks/lib/lua/5.1/?.so;/nix/store/95wpywsjf5iiw77f6n9rw347lk1sly15-luarocks-3.2.1/lib/lua/5.1/?.so"
|
set -xg LUA_CPATH "?.so;/nix/store/95wpywsjf5iiw77f6n9rw347lk1sly15-luarocks-3.2.1/share/lua/5.1/?/init.lua;/Users/salar/.luarocks/lib/lua/5.1/?.so;/nix/store/95wpywsjf5iiw77f6n9rw347lk1sly15-luarocks-3.2.1/lib/lua/5.1/?.so"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
promptInit = ''
|
interactiveShellInit = ''
|
||||||
eval (direnv hook fish)
|
eval (direnv hook fish)
|
||||||
any-nix-shell fish --info-right | source
|
any-nix-shell fish --info-right | source
|
||||||
'';
|
'';
|
||||||
|
@ -234,11 +235,8 @@
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.adoptopenjdk-bin
|
pkgs.adoptopenjdk-bin
|
||||||
pkgs.any-nix-shell
|
pkgs.any-nix-shell
|
||||||
pkgs.asciinema
|
|
||||||
pkgs.aspell
|
pkgs.aspell
|
||||||
pkgs.awscli
|
|
||||||
pkgs.bloop
|
pkgs.bloop
|
||||||
pkgs.cabal-install
|
|
||||||
pkgs.cmake
|
pkgs.cmake
|
||||||
pkgs.coursier
|
pkgs.coursier
|
||||||
pkgs.curlFull
|
pkgs.curlFull
|
||||||
|
@ -247,16 +245,11 @@
|
||||||
pkgs.exa
|
pkgs.exa
|
||||||
pkgs.fd
|
pkgs.fd
|
||||||
pkgs.ffmpeg
|
pkgs.ffmpeg
|
||||||
pkgs.ghcid
|
|
||||||
pkgs.gitAndTools.diff-so-fancy
|
pkgs.gitAndTools.diff-so-fancy
|
||||||
pkgs.global
|
pkgs.global
|
||||||
pkgs.gnupg
|
pkgs.gnupg
|
||||||
pkgs.gradle
|
pkgs.go
|
||||||
pkgs.graphviz
|
|
||||||
pkgs.hlint
|
|
||||||
pkgs.httpie
|
|
||||||
pkgs.hugo
|
pkgs.hugo
|
||||||
pkgs.hyperfine
|
|
||||||
pkgs.jansson
|
pkgs.jansson
|
||||||
pkgs.luajit
|
pkgs.luajit
|
||||||
pkgs.luajitPackages.luarocks
|
pkgs.luajitPackages.luarocks
|
||||||
|
@ -276,15 +269,17 @@
|
||||||
pkgs.nodePackages.yaml-language-server
|
pkgs.nodePackages.yaml-language-server
|
||||||
pkgs.openssl
|
pkgs.openssl
|
||||||
pkgs.pandoc
|
pkgs.pandoc
|
||||||
pkgs.pgcli
|
|
||||||
pkgs.prettyping
|
pkgs.prettyping
|
||||||
pkgs.procs
|
pkgs.procs
|
||||||
pkgs.python38Packages.debugpy
|
pkgs.python3Full
|
||||||
pkgs.ranger
|
pkgs.python39Packages.debugpy
|
||||||
pkgs.readline
|
pkgs.readline
|
||||||
pkgs.ripgrep
|
pkgs.ripgrep
|
||||||
|
pkgs.ripgrep-all
|
||||||
pkgs.rnix-lsp
|
pkgs.rnix-lsp
|
||||||
|
pkgs.rustup
|
||||||
pkgs.sbt
|
pkgs.sbt
|
||||||
|
pkgs.scala-cli
|
||||||
pkgs.shellcheck
|
pkgs.shellcheck
|
||||||
pkgs.stylua
|
pkgs.stylua
|
||||||
pkgs.sumneko-lua-language-server
|
pkgs.sumneko-lua-language-server
|
||||||
|
|
|
@ -16,6 +16,7 @@ local function load_plugins()
|
||||||
use { 'folke/trouble.nvim', requires = 'kyazdani42/nvim-web-devicons' }
|
use { 'folke/trouble.nvim', requires = 'kyazdani42/nvim-web-devicons' }
|
||||||
use { 'nvim-telescope/telescope.nvim', requires = { { 'nvim-lua/popup.nvim' }, { 'nvim-lua/plenary.nvim' } } }
|
use { 'nvim-telescope/telescope.nvim', requires = { { 'nvim-lua/popup.nvim' }, { 'nvim-lua/plenary.nvim' } } }
|
||||||
use 'nvim-telescope/telescope-dap.nvim'
|
use 'nvim-telescope/telescope-dap.nvim'
|
||||||
|
use {'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }
|
||||||
use 'windwp/nvim-autopairs' -- Autopairs
|
use 'windwp/nvim-autopairs' -- Autopairs
|
||||||
use 'kyazdani42/nvim-tree.lua' -- File explorer
|
use 'kyazdani42/nvim-tree.lua' -- File explorer
|
||||||
use {
|
use {
|
||||||
|
@ -41,7 +42,6 @@ local function load_plugins()
|
||||||
use 'b3nj5m1n/kommentary'
|
use 'b3nj5m1n/kommentary'
|
||||||
use 'ckipp01/stylua-nvim'
|
use 'ckipp01/stylua-nvim'
|
||||||
use 'gennaro-tedesco/nvim-jqx'
|
use 'gennaro-tedesco/nvim-jqx'
|
||||||
use 'kristijanhusak/orgmode.nvim'
|
|
||||||
use 'p00f/nvim-ts-rainbow'
|
use 'p00f/nvim-ts-rainbow'
|
||||||
use 'christoomey/vim-tmux-navigator'
|
use 'christoomey/vim-tmux-navigator'
|
||||||
end)
|
end)
|
||||||
|
@ -124,13 +124,6 @@ _G.load_config = function()
|
||||||
|
|
||||||
require('dap-python').test_runner = 'pytest'
|
require('dap-python').test_runner = 'pytest'
|
||||||
|
|
||||||
|
|
||||||
-- orgmode.nvim
|
|
||||||
require('orgmode').setup({
|
|
||||||
org_agenda_files = {'~/Documents/org'},
|
|
||||||
org_default_notes_file = '~/Documents/org/notes.org'
|
|
||||||
})
|
|
||||||
|
|
||||||
-- nvim-tree
|
-- nvim-tree
|
||||||
require('nvim-tree').setup()
|
require('nvim-tree').setup()
|
||||||
|
|
||||||
|
@ -308,12 +301,19 @@ _G.load_config = function()
|
||||||
['<C-d>'] = false,
|
['<C-d>'] = false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
generic_sorter = require('telescope.sorters').get_fzy_sorter,
|
file_ignore_patterns = { "node_modules", "target"},
|
||||||
file_sorter = require('telescope.sorters').get_fzy_sorter,
|
extensions = {
|
||||||
file_ignore_patterns = { "node_modules", "target"}
|
fzf = {
|
||||||
|
fuzzy = true,
|
||||||
|
override_generic_sorter = true,
|
||||||
|
override_file_sorter = true,
|
||||||
|
case_mode = "smart_case"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
require('telescope').load_extension('dap')
|
require('telescope').load_extension('dap')
|
||||||
|
require('telescope').load_extension('fzf')
|
||||||
|
|
||||||
--Add leader shortcuts
|
--Add leader shortcuts
|
||||||
vim.api.nvim_set_keymap('n', '<leader>f', [[<cmd>lua require('telescope.builtin').find_files()<cr>]], { noremap = true, silent = true })
|
vim.api.nvim_set_keymap('n', '<leader>f', [[<cmd>lua require('telescope.builtin').find_files()<cr>]], { noremap = true, silent = true })
|
||||||
|
@ -443,10 +443,10 @@ _G.load_config = function()
|
||||||
require('lspconfig').sumneko_lua.setup(luadev)
|
require('lspconfig').sumneko_lua.setup(luadev)
|
||||||
|
|
||||||
-- metals
|
-- metals
|
||||||
vim.g.metals_server_version = '0.10.7+84-9d4bcf78-SNAPSHOT'
|
-- vim.g.metals_server_version = '0.10.7+84-9d4bcf78-SNAPSHOT'
|
||||||
vim.opt_global.shortmess:remove('F'):append 'c'
|
-- vim.opt_global.shortmess:remove('F'):append 'c'
|
||||||
Metals_config = require('metals').bare_config
|
local metals_config = require('metals').bare_config()
|
||||||
Metals_config.settings = {
|
metals_config.settings = {
|
||||||
showImplicitArguments = true,
|
showImplicitArguments = true,
|
||||||
showInferredType = true,
|
showInferredType = true,
|
||||||
bloopSbtAlreadyInstalled = true,
|
bloopSbtAlreadyInstalled = true,
|
||||||
|
@ -459,17 +459,17 @@ _G.load_config = function()
|
||||||
superMethodLensesEnabled = true,
|
superMethodLensesEnabled = true,
|
||||||
javaHome = "/Users/salar/.nix-profile"
|
javaHome = "/Users/salar/.nix-profile"
|
||||||
}
|
}
|
||||||
Metals_config.init_options.statusBarProvider = 'on'
|
metals_config.init_options.statusBarProvider = 'on'
|
||||||
Metals_config.on_attach = function(client, bufnr)
|
metals_config.on_attach = function(client, bufnr)
|
||||||
-- vim.cmd([[autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()]])
|
vim.cmd([[autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()]])
|
||||||
-- vim.cmd([[autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()]])
|
vim.cmd([[autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()]])
|
||||||
-- vim.cmd([[autocmd BufEnter,CursorHold,InsertLeave <buffer> lua vim.lsp.codelens.refresh()]])
|
vim.cmd([[autocmd BufEnter,CursorHold,InsertLeave <buffer> lua vim.lsp.codelens.refresh()]])
|
||||||
|
|
||||||
require("metals").setup_dap()
|
require("metals").setup_dap()
|
||||||
end
|
end
|
||||||
vim.cmd [[augroup lsp]]
|
vim.cmd [[augroup lsp]]
|
||||||
vim.cmd [[au!]]
|
vim.cmd [[au!]]
|
||||||
vim.cmd [[au FileType scala,sbt lua require("metals").initialize_or_attach(Metals_config)]]
|
vim.cmd [[au FileType scala,sbt lua require("metals").initialize_or_attach(metals_config)]]
|
||||||
vim.cmd [[augroup end]]
|
vim.cmd [[augroup end]]
|
||||||
|
|
||||||
-- Map :Format to vim.lsp.buf.formatting()
|
-- Map :Format to vim.lsp.buf.formatting()
|
||||||
|
@ -502,7 +502,6 @@ _G.load_config = function()
|
||||||
nvim_lua = true,
|
nvim_lua = true,
|
||||||
buffer = true,
|
buffer = true,
|
||||||
luasnip = true,
|
luasnip = true,
|
||||||
orgmode = true,
|
|
||||||
tabnine = true,
|
tabnine = true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue