Skip to content

Commit d764cb5

Browse files
committed
Local customization
1 parent 3338d39 commit d764cb5

3 files changed

Lines changed: 121 additions & 18 deletions

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ test.sh
44
nvim
55

66
spell/
7-
lazy-lock.json

init.lua

Lines changed: 91 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ P.S. You can delete this when you're done too. It's your config now! :)
8787
-- Set <space> as the leader key
8888
-- See `:help mapleader`
8989
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
90-
vim.g.mapleader = ' '
91-
vim.g.maplocalleader = ' '
90+
vim.g.mapleader = ','
91+
vim.g.maplocalleader = ','
9292

9393
-- Set to true if you have a Nerd Font installed and selected in the terminal
94-
vim.g.have_nerd_font = false
94+
vim.g.have_nerd_font = true
9595

9696
-- [[ Setting options ]]
9797
-- See `:help vim.o`
@@ -102,7 +102,7 @@ vim.g.have_nerd_font = false
102102
vim.o.number = true
103103
-- You can also add relative line numbers, to help with jumping.
104104
-- Experiment for yourself to see if you like it!
105-
-- vim.o.relativenumber = true
105+
vim.opt.relativenumber = true
106106

107107
-- Enable mouse mode, can be useful for resizing splits for example!
108108
vim.o.mouse = 'a'
@@ -247,7 +247,10 @@ rtp:prepend(lazypath)
247247
-- NOTE: Here is where you install your plugins.
248248
require('lazy').setup({
249249
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
250-
'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically
250+
{
251+
'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically
252+
opts = {},
253+
},
251254

252255
-- NOTE: Plugins can also be added by using a table,
253256
-- with the first argument being the link and the following
@@ -429,6 +432,7 @@ require('lazy').setup({
429432
vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' })
430433
vim.keymap.set('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' })
431434
vim.keymap.set('n', '<leader>sf', builtin.find_files, { desc = '[S]earch [F]iles' })
435+
vim.keymap.set('n', '<C-f>', builtin.find_files, { desc = '[S]earch [F]iles' })
432436
vim.keymap.set('n', '<leader>ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' })
433437
vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' })
434438
vim.keymap.set('n', '<leader>sg', builtin.live_grep, { desc = '[S]earch by [G]rep' })
@@ -672,18 +676,30 @@ require('lazy').setup({
672676
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
673677
local servers = {
674678
-- clangd = {},
675-
-- gopls = {},
676-
-- pyright = {},
677-
-- rust_analyzer = {},
679+
gopls = {},
680+
pyright = {},
681+
rust_analyzer = {
682+
settings = {
683+
['rust-analyzer'] = {
684+
procMacro = { enable = true },
685+
},
686+
},
687+
},
678688
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
679689
--
680690
-- Some languages (like typescript) have entire language plugins that can be useful:
681691
-- https://github.com/pmizio/typescript-tools.nvim
682692
--
683693
-- But for many setups, the LSP (`ts_ls`) will work just fine
684-
-- ts_ls = {},
694+
ts_ls = {},
685695
--
686696

697+
-- Open API
698+
-- spectral = {},
699+
-- vacuum = {},
700+
701+
yamlls = {},
702+
687703
lua_ls = {
688704
-- cmd = { ... },
689705
-- filetypes = { ... },
@@ -698,6 +714,15 @@ require('lazy').setup({
698714
},
699715
},
700716
},
717+
-- PHP
718+
intelephense = {},
719+
}
720+
vim.filetype.add {
721+
pattern = {
722+
['openapi.*%.ya?ml'] = 'yaml.openapi',
723+
['.*.oas.ya?ml'] = 'yaml.openapi',
724+
['openapi.*%.json'] = 'json.openapi',
725+
},
701726
}
702727

703728
-- Ensure the servers and tools above are installed
@@ -761,18 +786,20 @@ require('lazy').setup({
761786
return nil
762787
else
763788
return {
764-
timeout_ms = 500,
789+
timeout_ms = 5000,
765790
lsp_format = 'fallback',
766791
}
767792
end
768793
end,
769794
formatters_by_ft = {
770795
lua = { 'stylua' },
796+
rust = { 'rustfmt' },
771797
-- Conform can also run multiple formatters sequentially
772-
-- python = { "isort", "black" },
798+
python = { 'isort', 'black' },
773799
--
774800
-- You can use 'stop_after_first' to run the first available formatter from the list
775-
-- javascript = { "prettierd", "prettier", stop_after_first = true },
801+
javascript = { 'prettierd', 'prettier', stop_after_first = true },
802+
html = { 'prettierd', 'prettier', stop_after_first = true },
776803
},
777804
},
778805
},
@@ -835,7 +862,7 @@ require('lazy').setup({
835862
-- <c-k>: Toggle signature help
836863
--
837864
-- See :h blink-cmp-config-keymap for defining your own keymap
838-
preset = 'default',
865+
preset = 'enter',
839866

840867
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
841868
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
@@ -894,9 +921,45 @@ require('lazy').setup({
894921
-- Load the colorscheme here.
895922
-- Like many other themes, this one has different styles, and you could load
896923
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
897-
vim.cmd.colorscheme 'tokyonight-night'
924+
-- vim.cmd.colorscheme 'tokyonight-night'
925+
end,
926+
},
927+
{
928+
'maxmx03/solarized.nvim',
929+
lazy = false,
930+
priority = 1000,
931+
config = function()
932+
vim.o.background = 'light' -- or 'dark'
933+
end,
934+
},
935+
{
936+
'catppuccin/nvim',
937+
name = 'catppuccin',
938+
priority = 1000,
939+
config = function()
940+
require('catppuccin').setup {
941+
color_overrides = {
942+
latte = {
943+
base = '#e4e4e4',
944+
},
945+
},
946+
}
898947
end,
899948
},
949+
-- Autoclose parenthesis and quotes
950+
{
951+
'm4xshen/autoclose.nvim',
952+
config = function()
953+
require('autoclose').setup {
954+
options = {
955+
disable_when_touch = true,
956+
},
957+
}
958+
end,
959+
},
960+
{
961+
'airblade/vim-rooter',
962+
},
900963

901964
-- Highlight todo, notes, etc in comments
902965
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
@@ -921,7 +984,7 @@ require('lazy').setup({
921984

922985
-- Simple and easy statusline.
923986
-- You could remove this setup call if you don't like it,
924-
-- and try some other statusline plugin
987+
-- and try some other statusline pluginPlug 'm4xshen/autoclose.nvim'
925988
local statusline = require 'mini.statusline'
926989
-- set use_icons to true if you have a Nerd Font
927990
statusline.setup { use_icons = vim.g.have_nerd_font }
@@ -963,6 +1026,15 @@ require('lazy').setup({
9631026
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
9641027
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
9651028
},
1029+
-- {
1030+
-- 'ibhagwan/fzf-lua',
1031+
-- -- optional for icon support
1032+
-- dependencies = { 'nvim-tree/nvim-web-devicons' },
1033+
-- config = function()
1034+
-- -- calling `setup` is optional for customization
1035+
-- require('fzf-lua').setup {}
1036+
-- end,
1037+
-- },
9661038

9671039
-- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the
9681040
-- init.lua. If you want these files, they are in the repository, so you can just download them and
@@ -975,8 +1047,8 @@ require('lazy').setup({
9751047
--
9761048
-- require 'kickstart.plugins.debug',
9771049
-- require 'kickstart.plugins.indent_line',
978-
-- require 'kickstart.plugins.lint',
979-
-- require 'kickstart.plugins.autopairs',
1050+
require 'kickstart.plugins.lint',
1051+
require 'kickstart.plugins.autopairs',
9801052
-- require 'kickstart.plugins.neo-tree',
9811053
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
9821054

@@ -1012,5 +1084,7 @@ require('lazy').setup({
10121084
},
10131085
})
10141086

1087+
vim.cmd.colorscheme 'catppuccin-mocha'
1088+
10151089
-- The line beneath this is called `modeline`. See `:help modeline`
10161090
-- vim: ts=2 sts=2 sw=2 et

lazy-lock.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" },
3+
"autoclose.nvim": { "branch": "main", "commit": "3f86702b54a861a17d7994b2e32a7c648cb12fb1" },
4+
"blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" },
5+
"catppuccin": { "branch": "main", "commit": "5af9374957a65be8770696da295dc9016b96f241" },
6+
"conform.nvim": { "branch": "master", "commit": "b4aab989db276993ea5dcb78872be494ce546521" },
7+
"fidget.nvim": { "branch": "main", "commit": "3f5475949679953af6d78654db29b944fa826e6a" },
8+
"gitsigns.nvim": { "branch": "main", "commit": "f780609807eca1f783a36a8a31c30a48fbe150c5" },
9+
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
10+
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
11+
"lazydev.nvim": { "branch": "main", "commit": "258d2a5ef4a3e3d6d9ba9da72c9725c53e9afcbd" },
12+
"mason-lspconfig.nvim": { "branch": "main", "commit": "a1067cf84b4ff81b66d2bf4d01f4cbdb5de40bd0" },
13+
"mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" },
14+
"mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" },
15+
"mini.nvim": { "branch": "main", "commit": "256d35c9e24c9cf5f5da568e121e988c6ceb1e3f" },
16+
"nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" },
17+
"nvim-lint": { "branch": "master", "commit": "335a6044be16d7701001059cba9baa36fbeef422" },
18+
"nvim-lspconfig": { "branch": "master", "commit": "336b388c272555d2ae94627a50df4c2f89a5e257" },
19+
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
20+
"nvim-web-devicons": { "branch": "master", "commit": "6e51ca170563330e063720449c21f43e27ca0bc1" },
21+
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
22+
"solarized.nvim": { "branch": "main", "commit": "c0dfe1cbfabd93b546baf5f1408f5df7e02e2050" },
23+
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
24+
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
25+
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
26+
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
27+
"tokyonight.nvim": { "branch": "main", "commit": "ca56e536f565293b83a075971fb5880cfe41d6de" },
28+
"vim-rooter": { "branch": "master", "commit": "51402fb77c4d6ae94994e37dc7ca13bec8f4afcc" },
29+
"which-key.nvim": { "branch": "main", "commit": "904308e6885bbb7b60714c80ab3daf0c071c1492" }
30+
}

0 commit comments

Comments
 (0)