Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin Bałazy authored and Marcin Bałazy committed Jun 12, 2023
1 parent f8b4fe8 commit a7e468d
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 47 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@

plugin/packer_compiled.lua
plugin/packer_compiled.lua
session
106 changes: 60 additions & 46 deletions config.lua
Original file line number Diff line number Diff line change
@@ -1,37 +1,16 @@
vim.cmd("set number relativenumber")
-- vim.lsp.set_log_level("debug")

lvim.format_on_save = false

lvim.leader = "space"

lvim.colorscheme = "horizon"
vim.opt.scrolloff = 16
lvim.colorscheme = "onedark"

require("tokyonight").setup({
-- your configuration comes here
-- or leave it empty to use the default settings
style = "storm", -- The theme comes in three styles, `storm`, `moon`, a darker variant `night` and `day`
light_style = "day", -- The theme is used when the background is set to light
transparent = false, -- Enable this to disable setting the background color
terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim
styles = {
-- Style to be applied to different syntax groups
-- Value is any valid attr-list value for `:help nvim_set_hl`
comments = { italic = true },
keywords = { italic = true },
functions = {},
variables = {},
-- Background styles. Can be "dark", "transparent" or "normal"
sidebars = "dark", -- style for sidebars, see below
floats = "dark", -- style for floating windows
},
sidebars = { "qf", "help" }, -- Set a darker background on sidebar-like windows. For example: `["qf", "vista_kind", "terminal", "packer"]`
day_brightness = 0.3, -- Adjusts the brightness of the colors of the **Day** style. Number between 0 and 1, from dull to vibrant colors
hide_inactive_statusline = false, -- Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine** and **LuaLine**.
dim_inactive = false, -- dims inactive windows
lualine_bold = false, -- When `true`, section headers in the lualine theme will be bold
})
require('onedark').setup {
style = 'darker'
}
require('onedark').load()

vim.opt.scrolloff = 16

lvim.builtin.terminal.active = true
lvim.builtin.nvimtree.side = "left"
Expand All @@ -40,11 +19,57 @@ lvim.builtin.nvimtree.setup.reload_on_bufenter = true
lvim.builtin.nvimtree.setup.auto_reload_on_write = true

-- lvim.builtin.nvimtree.setup.actions.open_file.quit_on_open = true
require("telescope").load_extension("persisted")

lvim.builtin.treesitter.highlight.enabled = true
lvim.builtin.treesitter.autotag.enable = true
-- lvim.builtin.treesitter.highlight.enabled = true
-- lvim.builtin.treesitter.autotag.enable = true
lvim.builtin.treesitter.rainbow.enable = true



lvim.builtin.alpha.dashboard.section.buttons.entries = {
{ "c", lvim.icons.ui.Fire .. " Current Sessions", "<CMD>SessionLoad<CR>" },
{ "s", lvim.icons.ui.Code .. " Sessions", "<CMD>Telescope persisted<CR>" },
{ "f", lvim.icons.ui.FindFile .. " Find File", "<CMD>Telescope find_files<CR>" },
{ "n", lvim.icons.ui.NewFile .. " New File", "<CMD>ene!<CR>" },
{ "p", lvim.icons.ui.Project .. " Projects ", "<CMD>Telescope projects<CR>" },
{ "r", lvim.icons.ui.History .. " Recent files", ":Telescope oldfiles <CR>" },
{ "t", lvim.icons.ui.FindText .. " Find Text", "<CMD>Telescope live_grep<CR>" },
}

require("nvim-treesitter.configs").setup({
rainbow = {
enable = true,
-- disable = { "jsx", "cpp" }, list of languages you want to disable the plugin for
-- extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
-- colors = {}, -- table of hex strings
}
})

require('telescope').setup({
extensions = {
persisted = {
layout_config = { width = 0.55, height = 0.55 }
}
}
})

require("persisted").setup({
save_dir = vim.fn.expand(vim.fn.stdpath("data") .. "/sessions/"), -- directory where session files are saved
silent = false, -- silent nvim message when sourcing session file
use_git_branch = false, -- create session files based on the branch of the git enabled repository
autosave = true, -- automatically save session files when exiting Neovim
should_autosave = nil, -- function to determine if a session should be autosaved
autoload = true, -- automatically load the session for the cwd on Neovim startup
on_autoload_no_session = nil, -- function to run when `autoload = true` but there is no session to load
follow_cwd = true, -- change session file name to match current working directory if it changes
allowed_dirs = nil, -- table of dirs that the plugin will auto-save and auto-load from
ignored_dirs = nil, -- table of dirs that are ignored when auto-saving and auto-loading
telescope = { -- options for the telescope extension
reset_prompt_after_deletion = true, -- whether to reset prompt after session deleted
},
})

lvim.builtin.telescope.defaults.prompt_prefix = ""
lvim.builtin.telescope.defaults.selection_caret = ">"
lvim.builtin.telescope.defaults.layout_config.width = 0.9
Expand Down Expand Up @@ -73,9 +98,8 @@ vim.api.nvim_create_autocmd("BufEnter", {

-- load snippets
require("luasnip.loaders.from_vscode").lazy_load({ paths = { "./snippets/" } })
require("telescope").load_extension('harpoon')
require("typescript").setup({})

require("typescript").setup({})
require("linters")
require("which")
require("cmpMappings")
Expand All @@ -86,16 +110,14 @@ lvim.plugins = {
},
{
"SmiteshP/nvim-gps",
requires = "nvim-treesitter/nvim-treesitter",
dependencies = "nvim-treesitter/nvim-treesitter",
},
{
"navarasu/onedark.nvim",
},
{
"ThePrimeagen/harpoon",
"olimorris/persisted.nvim",
config = true
},
{
"lunarvim/horizon.nvim",
"navarasu/onedark.nvim",
},
{
"jose-elias-alvarez/typescript.nvim",
Expand All @@ -111,14 +133,6 @@ lvim.plugins = {
-- { "Pocco81/DAPInstall.nvim", branch = "dev" },
{ "David-Kunz/jester" },
-- { "rcarriga/nvim-dap-ui" },
{
"rmagatti/auto-session",
config = function()
require("auto-session").setup({
log_level = "info",
})
end,
},
}

require("indent_blankline").setup({
Expand Down
53 changes: 53 additions & 0 deletions lazy-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"Comment.nvim": { "branch": "master", "commit": "38d3b7eb553872d8866f14a0dd4fe84126068fce" },
"LuaSnip": { "branch": "master", "commit": "e77fa9ad0b1f4fc6cddf54e51047e17e90c7d7ed" },
"alpha-nvim": { "branch": "main", "commit": "87c204040e3f5d4c1c95067b35905d8f8a2f2545" },
"bigfile.nvim": { "branch": "main", "commit": "c1bad34ce742b4f360b67ca23c873fef998240fc" },
"bufferline.nvim": { "branch": "main", "commit": "a4bd44523316928a7c4a5c09a3407d02c30b6027" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
"friendly-snippets": { "branch": "main", "commit": "631f79e346b0b3203d2ce3eae619ca8d612e5463" },
"gitsigns.nvim": { "branch": "main", "commit": "e5edefd9976039f5352e0c900f35206770b33a2d" },
"indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" },
"jester": { "branch": "main", "commit": "424b96970ac49da7b1298502e03143a8f11d5bcf" },
"lazy.nvim": { "branch": "main", "commit": "d6a782c7002682f4a01b79fc3918c4584ad6e8fb" },
"lir.nvim": { "branch": "master", "commit": "1aa871f20637eccc4e1e26b0fbcf9aafc9b6caf7" },
"lualine.nvim": { "branch": "master", "commit": "84ffb80e452d95e2c46fa29a98ea11a240f7843e" },
"lunar.nvim": { "branch": "master", "commit": "08bbc93b96ad698d22fc2aa01805786bcedc34b9" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "7276ffffcf51a8304b5fd4b81293be4ee010ec47" },
"mason.nvim": { "branch": "main", "commit": "057ac5ca159c83e302a55bd839a96ff1ea2396db" },
"neodev.nvim": { "branch": "main", "commit": "0043cf91c18aeac8db5765eb86c6078e17ac9325" },
"nlsp-settings.nvim": { "branch": "main", "commit": "32aa12da328258f2dccb15d327c26a8d21d9f4bd" },
"null-ls.nvim": { "branch": "main", "commit": "33b853a3933eed3137cd055aac4e539e69832ad0" },
"nvim-autopairs": { "branch": "master", "commit": "7566a86f44bb72ba2b1a609f528a27d93241502d" },
"nvim-cmp": { "branch": "main", "commit": "11102d3db12c7f8b35265ad0e17a21511e5b1e68" },
"nvim-dap": { "branch": "master", "commit": "6cedcb527e264c8f25e86afa8dae74c6692dee51" },
"nvim-dap-ui": { "branch": "master", "commit": "286f682f366fbc652b38dff893569374e9433dd3" },
"nvim-gps": { "branch": "master", "commit": "f4734dff6fc2f33b5fd13412e56c4fce06650a74" },
"nvim-lspconfig": { "branch": "master", "commit": "427378a03ffc1e1bc023275583a49b1993e524d0" },
"nvim-navic": { "branch": "master", "commit": "83dc174da915f9dbc9b51169e9b62a2e0d42b527" },
"nvim-tree.lua": { "branch": "master", "commit": "bb375fb20327c49920c41d2b51c1ce2f4fe7deb3" },
"nvim-treesitter": { "branch": "master", "commit": "2ce3c9080cfe4a39c7907e672edafd2a95244a7c" },
"nvim-ts-autotag": { "branch": "main", "commit": "40615e96075c743ef47aaf9de966dc348bec6459" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "0bf8fbc2ca8f8cdb6efbd0a9e32740d7a991e4c3" },
"nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" },
"nvim-web-devicons": { "branch": "master", "commit": "986875b7364095d6535e28bd4aac3a9357e91bbe" },
"onedark.nvim": { "branch": "master", "commit": "462b45758ea94ff30ad48979268094590a6b7b7e" },
"onedarker.nvim": { "branch": "freeze", "commit": "b00dd2189f264c5aeb4cf04c59439655ecd573ec" },
"persisted.nvim": { "branch": "main", "commit": "c384aa67067200001938338e8d32cb4261c99ba4" },
"plenary.nvim": { "branch": "master", "commit": "9ac3e9541bbabd9d73663d757e4fe48a675bb054" },
"project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" },
"schemastore.nvim": { "branch": "main", "commit": "0b396f538f195c249f021a48c3d8988f0d3f86f7" },
"structlog.nvim": { "branch": "main", "commit": "45b26a2b1036bb93c0e83f4225e85ab3cee8f476" },
"telescope-file-browser.nvim": { "branch": "master", "commit": "87dfaa9a9c251388cf4f01b9d4078c29d1fc8803" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" },
"telescope.nvim": { "branch": "0.1.x", "commit": "9de317bdea2bc393074651179c4fc7f93e9b2d56" },
"toggleterm.nvim": { "branch": "main", "commit": "68fdf851c2b7901a7065ff129b77d3483419ddce" },
"tokyonight.nvim": { "branch": "main", "commit": "c5df636ce62a8aab7565f35da143cfd672526302" },
"typescript.nvim": { "branch": "main", "commit": "5b3680e5c386e8778c081173ea0c978c14a40ccb" },
"vim-illuminate": { "branch": "master", "commit": "a2907275a6899c570d16e95b9db5fd921c167502" },
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
"which-key.nvim": { "branch": "main", "commit": "4acffc92953a90a790603bfdab7c92319ab167b1" }
}
1 change: 1 addition & 0 deletions lua/which.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ lvim.builtin.which_key.mappings.s.e = { "<cmd>Telescope file_browser<cr>", "File
lvim.builtin.which_key.mappings.s.B = { "<cmd>Telescope current_buffer_fuzzy_find<cr>", "Grep current buffer" }
lvim.builtin.which_key.mappings.s.b = { "<cmd>Telescope buffers<cr>", "Find buffer" }
lvim.builtin.which_key.mappings.s.p = { "<cmd>Telescope projects<cr>", "Find in projects" }
lvim.builtin.which_key.mappings.s.s = { "<cmd>Telescope persisted<cr>", "Grep strig" }
lvim.builtin.which_key.mappings.s.S = { "<cmd>Telescope grep_string<cr>", "Grep strig" }
lvim.builtin.which_key.mappings.s.j = {
"<cmd>lua require 'telescope'.extensions.file_browser.file_browser()<cr><cr>",
Expand Down
14 changes: 14 additions & 0 deletions snippets/js.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@
"console.log(util.inspect($0, false, null, true))"
]
},
"Import styled-components": {
"prefix": "sc",
"body": [
"import styled from 'styled-components/native'"
]
},
"styled component": {
"prefix": "ss",
"body": [
"const $1 = styled$2`",
" $3",
"`"
]
},
"Console.log": {
"prefix": "cl",
"body": [
Expand Down

0 comments on commit a7e468d

Please sign in to comment.