]> us-delaporte.pagekite.me Git - dotfiles.git/blob - files/tab/neovim/init.lua
Ignore .env files
[dotfiles.git] / files / tab / neovim / init.lua
1 -- local nvjournal = require("nvjournal")
2 -- nvjournal.setup()
3
4 -- require('csvview').setup()
5
6 -- vim.print("what?")
7 -- vim.opt.number = true
8 -- vim.g.mapleader = ' '
9
10
11
12
13
14 -- Bootstrap lazy.nvim
15 local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
16 if not (vim.uv or vim.loop).fs_stat(lazypath) then
17 local lazyrepo = "https://github.com/folke/lazy.nvim.git"
18 local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
19 if vim.v.shell_error ~= 0 then
20 vim.api.nvim_echo({
21 { "Failed to clone lazy.nvim:\n", "ErrorMsg" },
22 { out, "WarningMsg" },
23 { "\nPress any key to exit..." },
24 }, true, {})
25 vim.fn.getchar()
26 os.exit(1)
27 end
28 end
29 vim.opt.rtp:prepend(lazypath)
30
31 -- Make sure to setup `mapleader` and `maplocalleader` before
32 -- loading lazy.nvim so that mappings are correct.
33 -- This is also a good place to setup other settings (vim.opt)
34 vim.g.mapleader = " "
35 vim.g.maplocalleader = "\\"
36
37
38 -- SETTINGS
39
40 vim.api.nvim_set_keymap("n", "<leader>j", ":Note<CR>", { noremap = true, silent = true })
41 vim.api.nvim_set_keymap("n", "<leader>d", ":Note<CR>daily<CR>", { noremap = true, silent = true })
42
43 vim.api.nvim_set_keymap("n", "<leader>f", ":Telescope find_files<CR>", { noremap = true, silent = true })
44 vim.api.nvim_set_keymap("n", "<leader>g", ":Telescope live_grep<CR>", { noremap = true, silent = true })
45 vim.api.nvim_set_keymap("n", "<leader>b", ":Telescope buffers<CR>", { noremap = true, silent = true })
46 vim.api.nvim_set_keymap("n", "<leader>h", ":Telescope help_tags<CR>", { noremap = true, silent = true })
47
48
49
50 -- END SETTINGS
51 --
52 --
53
54 -- Setup lazy.nvim
55 require("lazy").setup({
56 spec = {
57 -- add your plugins here
58 },
59 -- Configure any other settings here. See the documentation for more details.
60 -- colorscheme that will be used when installing plugins.
61 install = { colorscheme = { "habamax" } },
62 -- automatically check for plugin updates
63 checker = { enabled = true },
64 })
65
66 vim.treesitter.start = function() return end
67