Skip to content
Closed

ok #1830

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ If you are experiencing issues, please make sure you have the latest versions.
External Requirements:
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation),
[fd-find](https://github.com/sharkdp/fd#installation)
- Clipboard tool (xclip/xsel/win32yank or other depending on the platform)
- [fd-find](https://github.com/sharkdp/fd#installation)
- Clipboard tool (xclip/xsel/win32yank or other dependiing on the platform)
- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons
- if you have it set `vim.g.have_nerd_font` in `init.lua` to true
- Emoji fonts (Ubuntu only, and only if you want emoji!) `sudo apt install fonts-noto-color-emoji`
Expand Down
2 changes: 2 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php echo "Hello";
echo "dir";
28 changes: 16 additions & 12 deletions init.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
--[[

=====================================================================
==================== READ THIS BEFORE CONTINUING ====================
=====================================================================
Expand Down Expand Up @@ -41,7 +40,6 @@ What is Kickstart?
- :help lua-guide
- (or HTML version): https://neovim.io/doc/user/lua-guide.html

Kickstart Guide:

TODO: The very first thing you should do is to run the command `:Tutor` in Neovim.

Expand Down Expand Up @@ -91,7 +89,7 @@ vim.g.mapleader = ' '
vim.g.maplocalleader = ' '

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

-- [[ Setting options ]]
-- See `:help vim.o`
Expand Down Expand Up @@ -167,6 +165,7 @@ vim.o.scrolloff = 10
vim.o.confirm = true

-- [[ Basic Keymaps ]]

-- See `:help vim.keymap.set()`

-- Clear highlights on search when pressing <Esc> in normal mode
Expand Down Expand Up @@ -490,11 +489,11 @@ require('lazy').setup({
{ 'j-hui/fidget.nvim', opts = {} },

-- Allows extra capabilities provided by blink.cmp
'saghen/blink.cmp',
{ 'saghen/blink.cmp' },
},
config = function()
-- Brief aside: **What is LSP?**
--

-- LSP is an initialism you've probably heard, but might not understand what it is.
--
-- LSP stands for Language Server Protocol. It's a protocol that helps editors
Expand Down Expand Up @@ -718,7 +717,6 @@ require('lazy').setup({
'stylua', -- Used to format Lua code
})
require('mason-tool-installer').setup { ensure_installed = ensure_installed }

require('mason-lspconfig').setup {
ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer)
automatic_installation = false,
Expand Down Expand Up @@ -836,7 +834,12 @@ require('lazy').setup({
--
-- See :h blink-cmp-config-keymap for defining your own keymap
preset = 'default',

['<S-Tab>'] = { 'select_prev', 'snippet_backward', 'fallback' },
['<Tab>'] = { 'select_next', 'snippet_forward', 'fallback' },
['<CR>'] = { 'accept', 'fallback' },
['<Esc>'] = { 'hide', 'fallback' },
['<PageUp>'] = { 'scroll_documentation_up', 'fallback' },
['<PageDown>'] = { 'scroll_documentation_down', 'fallback' },
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
},
Expand Down Expand Up @@ -976,15 +979,13 @@ require('lazy').setup({
-- require 'kickstart.plugins.debug',
-- require 'kickstart.plugins.indent_line',
-- require 'kickstart.plugins.lint',
-- require 'kickstart.plugins.autopairs',
-- require 'kickstart.plugins.neo-tree',
require 'kickstart.plugins.autopairs',
require 'kickstart.plugins.neo-tree',
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps

-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
-- This is the easiest way to modularize your config.
--
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
-- { import = 'custom.plugins' },
{ import = 'custom.plugins' },
--
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
-- Or use telescope!
Expand Down Expand Up @@ -1012,5 +1013,8 @@ require('lazy').setup({
},
})

--custom key map
require 'custom.keymaps.init'

-- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et
27 changes: 27 additions & 0 deletions lua/custom/keymaps/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
--keymap reset
vim.keymap.del('i', '<Tab>')
vim.keymap.del('i', '<S-Tab>')

--dart
vim.api.nvim_create_autocmd('FileType', {
pattern = 'dart',
callback = function()
vim.bo.tabstop = 2
vim.bo.shiftwidth = 2
vim.bo.softtabstop = 2
vim.bo.expandtab = true
end,
})
--dart run
vim.api.nvim_create_autocmd('FileType', {
pattern = 'dart',
callback = function()
vim.keymap.set('n', '<S-F10>', ':!dart run --enable-asserts %<CR>', { desc = 'Run Dart file' })
end,
})
--LSP Menu
vim.keymap.set('n', '<leader>ca', function()
vim.lsp.buf.code_action {
apply = false,
}
end, { desc = 'Quick fix (Dart LSP)' })
6 changes: 6 additions & 0 deletions lua/custom/keymaps/keymap.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
vim.api.nvim_create_autocmd('FileType', {
pattern = 'dart',
callback = function()
vim.keymap.set('n', '<S-F10>', ':!dart run %<CR>', { desc = 'Run Dart file' })
end,
})
5 changes: 5 additions & 0 deletions lua/custom/plugins/auto-save.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
return {
'pocco81/auto-save.nvim',
lazy = false,
config = true,
}
1 change: 1 addition & 0 deletions lua/custom/plugins/coc.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
return { 'neoclide/coc.nvim', branch = 'release' }
9 changes: 9 additions & 0 deletions lua/custom/plugins/flutter.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
return {
'nvim-flutter/flutter-tools.nvim',
lazy = false,
dependencies = {
'nvim-lua/plenary.nvim',
'stevearc/dressing.nvim', -- optional for vim.ui.select
},
config = true,
}
22 changes: 22 additions & 0 deletions lua/custom/plugins/hlchunk.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
return {
'shellRaining/hlchunk.nvim',
event = { 'BufReadPre', 'BufNewFile' },
config = function()
require('hlchunk').setup {
indent = {
enable = true,
style = { { fg = '#3c6370' } },
},
chunk = {
enable = true,
style = { { fg = '#abb2bf' } },
},
line_num = {
enable = true,
},
blank = {
enable = false,
},
}
end,
}
9 changes: 9 additions & 0 deletions lua/custom/plugins/nvim-ufo.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
return {
'kevinhwang91/nvim-ufo',
lazy = false,

dependencies = {
'kevinhwang91/promise-async',
},
config = false,
}