fix: fixed errors in env.sessionVariables
chore: simplified and updated keymappings for nvim feat: added telescope-nvim
This commit is contained in:
parent
a5c02c86cb
commit
0b615301e3
|
@ -119,6 +119,7 @@ in {
|
|||
package = pkgs.steam.override {
|
||||
extraPkgs = pkgs:
|
||||
with pkgs; [
|
||||
# vampir überlebende braucht diese pkgs
|
||||
libgdiplus
|
||||
cups
|
||||
];
|
||||
|
@ -157,15 +158,15 @@ in {
|
|||
umask 077
|
||||
'';
|
||||
# XDG base spec
|
||||
environment.sessionVariables = {
|
||||
environment.sessionVariables = rec {
|
||||
XDG_CACHE_HOME = "\${HOME}/.cache";
|
||||
XDG_CONFIG_HOME = "\${HOME}/.config";
|
||||
XDG_STATE_HOME = "\${HOME}/.local/state";
|
||||
XDG_DATA_HOME = "\${HOME}/.local/share";
|
||||
# xdg ninja recommendations
|
||||
CARGO_HOME = "\${XDG_DATA_HOME}/cargo";
|
||||
CUDA_CACHE_PATH = "\${XDG_CACHE_HOME}/nv";
|
||||
RUSTUP_HOME = "\${XDG_DATA_HOME}/rustup";
|
||||
WINEPREFIX = "\${XDG_DATA_HOME}/wine";
|
||||
CARGO_HOME = "${XDG_DATA_HOME}/cargo";
|
||||
CUDA_CACHE_PATH = "${XDG_CACHE_HOME}/nv";
|
||||
RUSTUP_HOME = "${XDG_DATA_HOME}/rustup";
|
||||
WINEPREFIX = "${XDG_DATA_HOME}/wine";
|
||||
};
|
||||
}
|
||||
|
|
5
data/nvim/lua/.luarc.json
Normal file
5
data/nvim/lua/.luarc.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"diagnostics.globals": [
|
||||
"vim"
|
||||
]
|
||||
}
|
|
@ -1,23 +1,23 @@
|
|||
-- global keybinds
|
||||
vim.g.mapleader = " "
|
||||
|
||||
local map = vim.api.nvim_set_keymap
|
||||
local map = vim.keymap.set
|
||||
local opts = {noremap = true, silent = true}
|
||||
|
||||
|
||||
-- change window with alt
|
||||
map("", "<M-down>" , "<down>" , { noremap = true, silent = true })
|
||||
map("", "<M-up>" , "<up>" , { noremap = true, silent = true })
|
||||
map("", "<M-left>" , "<left>" , { noremap = true, silent = true })
|
||||
map("", "<M-right>", "<right>", { noremap = true, silent = true })
|
||||
map("", "<M-down>" , "<down>" , opts)
|
||||
map("", "<M-up>" , "<up>" , opts)
|
||||
map("", "<M-left>" , "<left>" , opts)
|
||||
map("", "<M-right>", "<right>", opts)
|
||||
|
||||
map("", "<M-r>" , "<down>" , { noremap = true, silent = true })
|
||||
map("", "<M-l>" , "<up>" , { noremap = true, silent = true })
|
||||
map("", "<M-n>" , "<left>" , { noremap = true, silent = true })
|
||||
map("", "<M-s>", "<right>", { noremap = true, silent = true })
|
||||
map("", "<M-r>" , "<down>" , opts)
|
||||
map("", "<M-l>" , "<up>" , opts)
|
||||
map("", "<M-n>" , "<left>" , opts)
|
||||
map("", "<M-s>", "<right>", opts)
|
||||
|
||||
-- scroll with cursor loch
|
||||
map("" , "<S-down>" , "" , { noremap = true, silent = true })
|
||||
map("" , "<S-up>" , "" , { noremap = true, silent = true })
|
||||
map("i", "<S-down>" , "a", { noremap = true, silent = true })
|
||||
map("i", "<S-up>" , "a", { noremap = true, silent = true })
|
||||
map("" , "<S-down>" , "" , opts)
|
||||
map("" , "<S-up>" , "" , opts)
|
||||
map("i", "<S-down>" , "a", opts)
|
||||
map("i", "<S-up>" , "a", opts)
|
||||
|
|
|
@ -34,7 +34,7 @@ return {
|
|||
{
|
||||
"ntpeters/vim-better-whitespace",
|
||||
init = function()
|
||||
local map = vim.api.nvim_set_keymap
|
||||
local map = vim.keymap.set
|
||||
local opts = {noremap = true, silent = true}
|
||||
|
||||
function _G.whitespace_visibility()
|
||||
|
@ -57,6 +57,7 @@ return {
|
|||
dependencies = {
|
||||
"nvim-lua/plenary.nvim"
|
||||
},
|
||||
config = true,
|
||||
},
|
||||
-- bischen vim salat
|
||||
-- macht refactoring popups schöner
|
||||
|
|
|
@ -42,31 +42,6 @@ return {
|
|||
},
|
||||
main = "nvim-treesitter.configs",
|
||||
},
|
||||
-- manage and install lsp servers, linters and formatters
|
||||
-- This sadly does not work correctly with nix
|
||||
-- the installed lsp servers would need to be patchelf'd
|
||||
-- in most cases
|
||||
-- This might be fixable. but that's for another day
|
||||
--{
|
||||
-- "williamboman/mason.nvim",
|
||||
-- build = ":MasonUpdate", -- :MasonUpdate updates registry contents
|
||||
-- config = true,
|
||||
--},
|
||||
---- bridge the gap between mason and lspconfig
|
||||
--{
|
||||
-- "williamboman/mason-lspconfig.nvim",
|
||||
-- opts = {
|
||||
-- ensure_installed = { "nil_ls", },
|
||||
-- },
|
||||
-- init = function()
|
||||
-- require("mason-lspconfig").setup_handlers {
|
||||
-- function (server_name)
|
||||
-- require("lspconfig")[server_name].setup {}
|
||||
-- end,
|
||||
-- }
|
||||
-- end,
|
||||
--},
|
||||
-- lsp
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
|
@ -83,8 +58,24 @@ return {
|
|||
lspconfig.pyright.setup { capabilities = capabilities, }
|
||||
lspconfig.rust_analyzer.setup { capabilities = capabilities, }
|
||||
lspconfig.zls.setup { capabilities = capabilities, }
|
||||
|
||||
local map = vim.keymap.set
|
||||
local opts = {noremap = true, silent = true}
|
||||
|
||||
map('n', "<leader>l", vim.diagnostic.open_float, opts)
|
||||
map('n', 'gd', vim.lsp.buf.definition, opts)
|
||||
map('n', '<leader>r', vim.lsp.buf.rename, opts)
|
||||
map('n', '<leader>f', vim.lsp.buf.format, opts)
|
||||
map('n', '<leader>a', vim.lsp.buf.code_action, opts)
|
||||
|
||||
|
||||
end,
|
||||
},
|
||||
{
|
||||
'kosayoda/nvim-lightbulb',
|
||||
dependencies = 'antoinemadec/FixCursorHold.nvim',
|
||||
opts = {autocmd = {enabled = true}},
|
||||
},
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
|
|
25
data/nvim/lua/plugins/telescope.lua
Normal file
25
data/nvim/lua/plugins/telescope.lua
Normal file
|
@ -0,0 +1,25 @@
|
|||
return {
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
"kyazdani42/nvim-web-devicons",
|
||||
{"nvim-telescope/telescope-fzf-native.nvim", build = 'make'},
|
||||
},
|
||||
opts = {
|
||||
extensions = {
|
||||
fzf = {
|
||||
fuzzy = true, -- false will only do exact matching
|
||||
override_generic_sorter = true, -- override the generic sorter
|
||||
override_file_sorter = true, -- override the file sorter
|
||||
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
|
||||
}
|
||||
},
|
||||
},
|
||||
config = function(opts)
|
||||
local tele = require("telescope")
|
||||
tele.setup(opts)
|
||||
tele.load_extension('fzf')
|
||||
end,
|
||||
},
|
||||
}
|
|
@ -100,6 +100,11 @@
|
|||
extraPackages = with pkgs; [
|
||||
# tabnine complition braucht unzip
|
||||
unzip
|
||||
# telescope fzf native braucht make
|
||||
gnumake
|
||||
# telescope braucht die
|
||||
ripgrep
|
||||
fd
|
||||
];
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue